Description Usage Arguments Examples
A convenience wrapper around plot.default
with several sensible default arguments.
1 2 3 4 5 6 7 8 9 10 11 |
x |
a |
max_dt |
a non-negative |
type |
what type of plot should be drawn, see |
col |
the colors for lines and points. See |
xlab |
a label for the x axis. |
ylab |
a label for the y axis. |
plot.new |
logical If |
... |
other graphical parameters passed to |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | plot(ex_uts())
plot(ex_uts(), max_dt=dhours(12), type="b") # don't connect points more than 12 hours apart
plot(ex_uts(), max_dt=dhours(2), type="b")
# Plot time series with NAs
tmp <- ex_uts()
tmp$values[2] <- NA
plot(tmp, type="o") # isolated points are plotted as circles
plot(na.omit(tmp), type="b")
# Use custom date formatting for x axis
# -) the "format" argument is passed down to axis.POSIXct()
# -) this example produces several harmless warning messages, because other
# functions that are part of the call chain have no "format" argument
plot(ex_uts(), format="%a %I%p")
# Plot two time series on top of each other
plot(ex_uts())
plot(ex_uts() + 0.1, plot.new=FALSE, col="red")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.