Skip to content

Instantly share code, notes, and snippets.

@shelajev
Created May 10, 2018 12:07
Show Gist options
  • Select an option

  • Save shelajev/4738f757576f7018553498408e944efc to your computer and use it in GitHub Desktop.

Select an option

Save shelajev/4738f757576f7018553498408e944efc to your computer and use it in GitHub Desktop.
library(ggplot2)
data <<- numeric(100)
function(v) {
svg()
data <<- c(data[2:100], v)
plot <- ggplot(data = data.frame(systemLoad = data, time = -99:0),
aes(x=time, y=systemLoad, group=1)) +
geom_line(color="orange") +
expand_limits(x=0, y=0)
print(plot)
svg.off()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment