# Usual stairs plot has steps forward from x
x <- rnorm(10)
plot(1:10, x, type="s")
# Stairs with step backward from x
plot(1:10, x, type="n")
stairs(1:10, x)
# Use for time series plotting
plot_ts(Dbuilding, "heatload", c("2010-12-15","2010-12-16"), plotfun=stairs)
# Set it globally for all plot_ts
p <- par_ts()
p$plotfun <- stairs
options(par_ts=p)
plot_ts(Dbuilding, "heatload", c("2010-12-15","2010-12-16"))
# Modify it to only lines
plot_ts(Dbuilding, "heatload", c("2010-12-15","2010-12-16"),
plotfun=function(x,y,...){stairs(x,y, type="l")})
Run the code above in your browser using DataLab