You could use the filled shapes (21-25) and the use a fill scale where
one of the fill colors is NA.:
ggplot(mtcars, aes(x=wt, y=mpg)) +
geom_point(aes(shape=factor(vs), fill=factor(am))) +
scale_shape_manual(values=c(21, 22)) +
scale_fill_manual(values=c(NA, "black"))
For a list of point shapes:
http://wiki.stdout.org/rcookbook/Graphs/Shapes%20and%20line%20types/
-Winston
On Wed, Aug 29, 2012 at 12:07 PM, Tom A. <
ande...@gmail.com> wrote:
> Hello all,
> I am attempting to create a scatterplot where I want to show two different
> factors simultaneously, with four (Dens.AMAN in code below) and two
> (Dens.AMMA) levels of each factor, respectively. I was hoping to do this
> using four symbols that can be either open or closed (e.g. circle, square,
> triangle, diamond). Is there a way to specify a subset of data points
> within shape_solid() to become open or closed? Or would this be done more
> simply in scale_shape_manual()? Any help or advice on where to look would
> be greatly appreciated.
>
> ggplot(test1,aes(AMAN.surv,Mean.SVL))+geom_point(aes(size=2,shape=as.factor(Dens.AMMA)))+
>
> stat_smooth(method="lm",color="black",aes(lty=as.factor(Dens.AMMA)))+theme_bw()+scale_shape(solid=F)+
> opts(panel.grid.major = theme_line(colour=NA ),panel.grid.minor =
> theme_line(colour = NA))
>
> Cheers,
> Tom
>
> --
> You received this message because you are subscribed to the ggplot2 mailing
> list.
> Please provide a reproducible example:
>
https://github.com/hadley/devtools/wiki/Reproducibility
>
> To post: email
ggp...@googlegroups.com
> To unsubscribe: email
ggplot2+u...@googlegroups.com
> More options:
http://groups.google.com/group/ggplot2