library(ggplot2)
x <- c(1:100)
y <- c(1:100)
ch1 <- qplot(x, y)
ch2 <- ch1 +
theme(panel.grid.minor = element_line(colour = "white", size = 0.5)) +
scale_y_continuous(minor_breaks = seq(0, 100, 5))
ch2
I am making a chart with ggplot and can control the y axis minor grid lines.
But what do I have to do to contol the y axis major grid lines as well so they are not set automatically (for example in units of 10s, so lines and y unit labels at 10,20,30 etc)?
I tried major_breaks = seq(0 , 100, 10)
but it did not work.
Thank you for your help.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…