AlgebraOfGraphics.jl icon indicating copy to clipboard operation
AlgebraOfGraphics.jl copied to clipboard

`PolarAxis` not supported

Open marcpabst opened this issue 11 months ago • 2 comments

Bug description

PolarAxis is not supported.

Steps to reproduce

Running

AlgebraOfGraphics.draw(plt, axis=(type=PolarAxis, thetalimits=(-pi, pi)))

results in

MethodError: Cannot `convert` an object of type 
  Type{PolarAxis} to an object of type 
  Union{Type{Axis}, Type{Axis3}}

Changing this struct to include Type{PolarAxis} should fix the problem, but needs testing: https://github.com/MakieOrg/AlgebraOfGraphics.jl/blob/7c143ee2dc82ea0cc705498fee97d03c043481cc/src/entries.jl#L31-L35

Edit: Adding PolarAxis is apparently not enough, results in

MethodError: no method matching initialize_block!(::PolarAxis; zlabel::String, zticks::MakieCore.Automatic, ylabel::String, xlabel::String, xticks::MakieCore.Automatic, yticks::MakieCore.Automatic)

Btw: I really like AoG!

marcpabst avatar Mar 13 '24 01:03 marcpabst

I got it to work by omitting all of the arguments to PolarAxis that cause problems - but can anyone point me to the code wherexticks, xticks, xlabels etc are actually added to the axis tuple? Would be happy to properly fix this! Maybe @SimonDanisch or @piever?

marcpabst avatar Mar 13 '24 14:03 marcpabst