2

This is perhaps a very simple question but the help file doesn't seem to suggest anything helpful.

I am using googleVis to plot some data, however the absolute level is quite high, so I would like to set a minimum value for the y-axis for an gvisAnnotatedTimeLine function.

The below is an example...

df <- Sys.time()-100:1
df <- as.data.frame(df)
df$k <- 9000:9099
plot(gvisAnnotatedTimeLine(df, datevar="df",numvar="k", options=list(min=8000)))

The resultant timeline has the y-axis staring from zero, but I was hoping for it to start from 8000 or any arbitrary number I choose.

agamesh
  • 559
  • 1
  • 10
  • 26
h.l.m
  • 13,015
  • 22
  • 82
  • 169
  • The docs say that "If the minimum data point is less than this value, this setting will be ignored, and the chart will be adjusted to show the next major tick mark below the minimum data point.". – Roman Luštrik Jul 09 '12 at 09:27
  • But 8000 is less than 9000...so surely it shouldn't be ignored? Even changing the value to 9001 makes no difference... – h.l.m Jul 09 '12 at 11:05

1 Answers1

2

This should fix the issues...

df <- Sys.time()-100:1
df <- as.data.frame(df)
df$k <- 9000:9099
plot(gvisAnnotatedTimeLine(df, datevar="df",numvar="k", options=list(scaleType='maximized')))
h.l.m
  • 13,015
  • 22
  • 82
  • 169