Reputation: 951
Example from R graphics cookbook pg 55.
ggplot(tg, aes(x=factor(dose), y=length, colour=supp, group=supp)) + geom_line()
Looking for a similar plotting options in googlevis, on how to specify the fill options or color option which is a factor variable.
Upvotes: 2
Views: 262
Reputation: 5206
Please take a look at my answer for ggplot2 equivalent of 'factorization or categorization' in googleVis in R. It has diagrams and examples.
What you are looking for is called roles in goooglevis
and involving appending data columns with set names and linked to your variables. For example, if your variable is py
you will add a column py.style
where you set the fill colours.
@mages has this documented on this webpage, which shows features not in demo(googleVis):
http://cran.r-project.org/web/packages/googleVis/vignettes/Using_Roles_via_googleVis.html
All the best, micstr
Upvotes: 1