On 9/22/2013 8:48 PM, Kiyoshi Sasaki wrote:
> Could you please show me how to plot raw data points in those ggplots?
>
read ?geom_point

dat$Ivy3 <- factor(cut(dat$Ivy,3))
ggplot(dat, aes(Overstory, Presence), color=Ivy3 ) +
   stat_smooth(method="glm", family=binomial, formula= y~x, alpha=0.3, 
aes(fill=Ivy3)) +
   geom_point(position=position_jitter(height=0.02, width=0.05))

or to color the points by Ivy3

ggplot(dat, aes(Overstory, Presence), color=Ivy3 ) +
   stat_smooth(method="glm", family=binomial, formula= y~x, alpha=0.3, 
aes(fill=Ivy3)) +
   geom_point(aes(color=Ivy3), position=position_jitter(height=0.02, 
width=0.05))

-- 
Michael Friendly     Email: friendly AT yorku DOT ca
Professor, Psychology Dept. & Chair, Quantitative Methods
York University      Voice: 416 736-2100 x66249 Fax: 416 736-5814
4700 Keele Street    Web:   http://www.datavis.ca
Toronto, ONT  M3J 1P3 CANADA


	[[alternative HTML version deleted]]

