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
I was using label_number(accuracy=N) to manipulate my X-axis, because I wanted to reduce the number of labels and squeeze the plots into a small space without crowding the axis. I'm finding that this results in multiple 0 values on my X axis for some data, and I have no idea why. The labels don't reflect the expected range I get when I remove the accuracy statement.
Here is a closeup of one facet of the plot to show the problem:
here is a screenshot of a plot made with the same data but without the accuracy statement:
The accuracy argument only controls the precision with which the same set of tick labels are displayed. So setting accuracy = 0.5 is still going to generate breaks at -0.25, 0 & 0.25, but only display the number at a resolution of 0.5, hence all three are rounded to 0.
If you want to change the actual breaks in the axis, that should be done with the breaks argument of scale_x_continuous, not the labels argument.
I was using label_number(accuracy=N) to manipulate my X-axis, because I wanted to reduce the number of labels and squeeze the plots into a small space without crowding the axis. I'm finding that this results in multiple 0 values on my X axis for some data, and I have no idea why. The labels don't reflect the expected range I get when I remove the accuracy statement.
Here is a closeup of one facet of the plot to show the problem:
here is a screenshot of a plot made with the same data but without the accuracy statement:
If I remove the accuracy statement and just leave it as label_number(), I get a sensible axis but it's far too crowded by default.
Can anyone suggest what might be going on?
The text was updated successfully, but these errors were encountered: