vinsent paramanantham
vinsent paramanantham

Reputation: 951

similar to ggplot options in googlevis in R

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

Answers (1)

micstr
micstr

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

Related Questions