# NOT RUN {
# Using the minor breaks axis
p <- ggplot(iris, aes(Sepal.Width, Sepal.Length)) +
geom_point()
p + scale_y_continuous(guide = "axis_minor")
# Minor break positions are still controlled by the scale
p + scale_y_continuous(guide = "axis_minor",
minor_breaks = seq(4, 8, by = 0.2))
# Minor tick length is controlled relative to major ticks
p + scale_y_continuous(guide = "axis_minor") +
theme(ggh4x.axis.ticks.length.minor = rel(0.1))
# }
Run the code above in your browser using DataLab