Skip to content

Instantly share code, notes, and snippets.

@OrenBochman
Forked from mages/area2ylim.R
Created September 15, 2013 17:30
Show Gist options
  • Save OrenBochman/6572777 to your computer and use it in GitHub Desktop.
Save OrenBochman/6572777 to your computer and use it in GitHub Desktop.
set.seed(1234)
dat <- data.frame(x=LETTERS[1:10], y_1=sample(15,10), y_2=sample(150,10))
area2 <- gvisAreaChart(xvar="x", yvar=c("y_1", "y_2"), data=dat,
options=list(
series="[{targetAxisIndex:0},
{targetAxisIndex:1}]",
vAxes="[{viewWindowMode:'explicit',
viewWindow:{min:0, max:10}},
{viewWindowMode:'explicit',
viewWindow:{min:0, max:100}}]",
title="y-limits set individually",
width=500, height=400),
chartid="area2ylim")
plot(area2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment