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 ticks #4773

Open
12 tasks
briochemc opened this issue Feb 11, 2025 · 8 comments
Open
12 tasks

PolarAxis ticks #4773

briochemc opened this issue Feb 11, 2025 · 8 comments
Labels
enhancement Feature requests and enhancements

Comments

@briochemc
Copy link
Contributor

Feature description

I would like to kindly request an option to display ticks in a PolarAxis. I am assuming ideally that rticks and thetaticks would be controlled through the same options as for xticks, that is through these kwargs:

  • rtickalign
  • rtickcolor
  • rticksize
  • rticksmirrored
  • rticksvisible
  • rtickwidth
  • thetatickalign
  • thetatickcolor
  • thetaticksize
  • thetaticksmirrored
  • thetaticksvisible
  • thetatickwidth

(FWIW I'm coming from #4771 requesting a recipe for Taylor diagrams.)

@briochemc briochemc added the enhancement Feature requests and enhancements label Feb 11, 2025
@asinghvi17
Copy link
Member

Mirroring doesn't really make sense for a polar axis I think...flipping might but theta already has a similar thing, so it would just be for r

@asinghvi17
Copy link
Member

Alignment is also weird on polar axes

@briochemc
Copy link
Contributor Author

I'm probably missing something but doesn't mirroring make sense for r as long as theta does not wrap around the full 2pi and for theta as long as the lower limit for r is strictly positive?

@asinghvi17
Copy link
Member

That's a good point, if the polar axis does not cover the full angular range then there's room for mirroring in r, and vice versa for theta.

@briochemc
Copy link
Contributor Author

Alignment is also weird on polar axes

I wouldn't even know where to start, but what is challenging for PolarAxis ticks?

@ffreyer
Copy link
Collaborator

ffreyer commented Feb 13, 2025

Some of the things you listed should be easy to do - they just need to be added to the Block attributes in

@Block PolarAxis <: AbstractAxis begin
and connected to the appropriate plots in
function draw_axis!(po::PolarAxis)
E.g. color, size, visible, width.

Things like align and maybe mirroring could get more tricky because PolarAxis adjusts align and offset based where the tick label is placed. All of that should also be contained in the draw_axis function though

@asinghvi17
Copy link
Member

For theta ticks, for example, alignment is defined based on the angle the tick is at - similar for r ticks also I believe. If you don't do that, then the tick will probably clip into the axis at some angle.

@briochemc
Copy link
Contributor Author

For theta ticks, for example, alignment is defined based on the angle the tick is at - similar for r ticks also I believe. If you don't do that, then the tick will probably clip into the axis at some angle.

I understand that, but I think those angles are already computed here to place the labels, right? I'm just not sure where this happens, and I'm also lost as to where and what the code for drawing the ticks should be.

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

No branches or pull requests

3 participants