You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When converting a plot with secondary axis transformation from Cartesian to polar coordinates, I noticed two issues:
Label positions for the secondary axis become mis-aligned to match those of the primary axis;
When the secondary axis had fewer labels than the primary axis, the secondary axis label values are recycled to fill all the positions used by primary axis labels.
I suspect this is caused by the render_axis_v function in CoordPolar, more specifically the following section, which sets the axis label positions of the secondary axis to match those of the primary axis:
I was able to get the expected result when I modified the function to replace panel_params$r.sec.major <- x with the following line (essentially repeating the calculation done in r_rescale for secondary axis breaks & range):
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/
lockbot
locked and limited conversation to collaborators
Oct 27, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When converting a plot with secondary axis transformation from Cartesian to polar coordinates, I noticed two issues:
Label positions for the secondary axis become mis-aligned to match those of the primary axis;
When the secondary axis had fewer labels than the primary axis, the secondary axis label values are recycled to fill all the positions used by primary axis labels.
Reprex with annotated plots below:
I suspect this is caused by the
render_axis_v
function inCoordPolar
, more specifically the following section, which sets the axis label positions of the secondary axis to match those of the primary axis:I was able to get the expected result when I modified the function to replace
panel_params$r.sec.major <- x
with the following line (essentially repeating the calculation done inr_rescale
for secondary axis breaks & range):The text was updated successfully, but these errors were encountered: