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
library(ggplot2)
library(elementalist)
ggplot(mpg, aes(displ, hwy)) +
geom_point() +
theme(axis.ticks= element_line_wiggle(1))
#> Error in xy[-nxy, , drop = FALSE] - xy[-1, , drop = FALSE]: non-numeric argument to binary operator
Most likely because I've been ignoring the existence of compound units, such as arithmetic units (e.g. unit(1, "cm") + unit(0.2, "npc")). I've checked this through the debug system. I don't know what the optimal solution is, but here are some thoughts:
Delay evaluating line manipulations until draw time. This allows me to convert to absolute units first and then apply manipulations. Downside is that there is no consistency in line manipulations anymore as the plot window is resized and it makes resizing slower.
If this is an edge case for the axis guide ticks, we could probably get away with solving this in the particular case of axis guides instead of solving the general case. The only other 'ticks'-case I can think of are the guide_colourbar() ticks, but these don't appear to be under the control of the theme system.
Get advice from someone smarter than me on how this can be solved best.
Error more gracefully
The text was updated successfully, but these errors were encountered:
The following fails
Most likely because I've been ignoring the existence of compound units, such as arithmetic units (e.g.
unit(1, "cm") + unit(0.2, "npc")
). I've checked this through the debug system. I don't know what the optimal solution is, but here are some thoughts:Delay evaluating line manipulations until draw time. This allows me to convert to absolute units first and then apply manipulations. Downside is that there is no consistency in line manipulations anymore as the plot window is resized and it makes resizing slower.
If this is an edge case for the axis guide ticks, we could probably get away with solving this in the particular case of axis guides instead of solving the general case. The only other 'ticks'-case I can think of are the
guide_colourbar()
ticks, but these don't appear to be under the control of the theme system.Get advice from someone smarter than me on how this can be solved best.
Error more gracefully
The text was updated successfully, but these errors were encountered: