[R] Displaying additional values on the Y-axis ggplot2

Christopher David Desjardins cddesjardins at gmail.com
Thu Jun 24 20:16:22 CEST 2010

I am running the following code:

mfg0 <- ggplot(aes(x=Grade,y=Math,colour=RiskStatic45678),data=math.f)
mfg1 <- mfg0 + geom_smooth(method="lm", formula=y ~ ns(x,2),size=1) +  
geom_smooth(aes(y=nalt.math,color="NALT"),size=1,data=nalt) + 
scale_colour_brewer("Risk Status", pal="Set1") + coord_cartesian(ylim = 
c(175, 245))

And when I specify that, the only value that shows up on the Y-axis is a 
'200'. How can I manually specify that I want 180, 200, 220, and 240 to 
show up? Also please cc me on the email as I am a digest subscriber.


More information about the R-help mailing list