Can you clarify your question (I'm not sure what you mean by "control
for size and color") and provide a reproducible example?
-Ista
> --
> You received this message because you are subscribed to the ggplot2 mailing
> list.
> Please provide a reproducible example: http://gist.github.com/270442
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2
>
--
Ista Zahn
Graduate student
University of Rochester
Department of Clinical and Social Psychology
http://yourpsyche.org
On Mon, Oct 18, 2010 at 7:16 PM, Manuel Spínola <mspin...@gmail.com> wrote:
> Thank you very much Ista.
>
> Yes, I am attaching the data (indicegeo).
Great, thanks for the example.
>
> p = ggplot(geo1, aes(x, y))
> p + geom_point(aes(size = md)) + scale_size(name = "Indice", breaks = c(0.1,
> 0.5, 1, 5, 10, 15, 20, 25, 50)) + theme_bw()
>
> In the code I am setting the point size according to the variable md, but I
> also want the points to be in different colors (colour = md).
you just need to tell ggplot what you're telling me (literally!).
p + geom_point(aes(size = md, colour=md)) + scale_size(name =
"Indice", breaks = c(0.1, 0.5, 1, 5, 10, 15, 20, 25, 50)) + theme_bw()
>
> Regarding to the other question, the data set has 2 different groups
> (geographically different) and I would like to do 2 facets to show each
> group but with different limits for the x axis. I am attaching a plot.
So you need a faceting variable.
p + geom_point(aes(size = md, color=md)) + scale_size(name = "Indice",
breaks = c(0.1, 0.5, 1, 5, 10, 15, 20, 25, 50)) + theme_bw() +
facet_grid(.~sitio, scales="free")
These are pretty standard features, have you browsed http://had.co.nz/ggplot2/?
-Ista
--
p + geom_point(aes(size = md, color=md)) + scale_size(name = "Indice", breaks = c(0.1, 0.5, 1, 5, 10, 15, 20, 25, 50)) + theme_bw() + facet_grid(.~sitio, scales="free")
--