I can't seem to add x-axis breaks when using the
"reciprocal" transformation in
scale_x_continuous. Given the following dummy data
p <- tibble(x = c(1, 3, 10, 30), y = 1:4) %>% ggplot(aes(x, y, label = x)) + geom_text() p
I can add breaks just fine as is. (I've skipped the break at 3 on purpose to show that I'm manually overriding the defaults.)
p + scale_x_continuous(breaks = c(1, 10, 30))
In another transformation like
"log10", the custom breaks are fine.
p + scale_x_continuous(trans = "log10", breaks = c(1, 10, 30))
But when I use
"reciprocal", not only are they missing when
breaks is not specified, but they're also missing when
breaks is specified.
p + scale_x_continuous(trans = "reciprocal", breaks = c(1, 10, 30))
Is this a bug or am I doing something wrong?