Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PolarAxis not supported #494

Open
marcpabst opened this issue Mar 13, 2024 · 2 comments
Open

PolarAxis not supported #494

marcpabst opened this issue Mar 13, 2024 · 2 comments

Comments

@marcpabst
Copy link

marcpabst commented Mar 13, 2024

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:

struct AxisSpec
type::Union{Type{Axis}, Type{Axis3}}
position::Tuple{Int,Int}
attributes::NamedArguments
end

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
Copy link
Author

marcpabst commented Mar 13, 2024

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?

@jkrumbiegel
Copy link
Member

It's a bit hidden but the symbols are assembled here

for (k, v) in pairs((label=label, ticks=ticks(scale)))
keyword = Symbol(var, k)
and would have to be adjusted for PolarAxis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants