assume the following MWE:
library(ggplot2)
library(ggthemes)
set.seed(100)
df <- data.frame(x = rnorm(50), y = rnorm(50))
ggplot(df, aes(x,y)) +
geom_point() +
theme_tufte() +
geom_rangeframe() +
scale_x_continuous(breaks = extended_range_breaks()(df$x),
labels = scales::number_format(accuracy = 0.1))+
scale_y_continuous(breaks = extended_range_breaks()(df$y),
labels = scales::number_format(accuracy = 0.1))
From my point of view the number of ticks on the y-axis is not enough, the space between 1.0 and 2.9 is too large and I would like to have another tick at 2.0. Anyone an idea how to do that when working with extended_range_breaks or do I have to switch to manually setting the ticks?
I tried scale_y_continuous(n.breaks = 7)
and scale_y_continuous(breaks = extended_range_breaks(n = 7)(df$y)
but both don't have an effect.