## Please note that by default the googleVis plot command
## will open a browser window and requires an internet
## connection to display the visualisation.
## Scatter chart
Scatter1 <- gvisScatterChart(women)
plot(Scatter1)
## Using optional arguments
Scatter2 <- gvisScatterChart(women, options=list(legend="none",
lineWidth=2, pointSize=0,
title="Women", vAxis="{title:'weight (lbs)'}",
hAxis="{title:'height (in)'}", width=300, height=300))
plot(Scatter2)
df=data.frame(x=sin(1:100/3),
Circle=cos(1:100/3),
Ellipse=cos(1:100/3)*0.5)
## Plot several variables as smooth curves
Scatter3 <- gvisScatterChart(df,
options=list(curveType='function',
pointSize=0,
lineWidth=2))
plot(Scatter3)
Run the code above in your browser using DataLab