plot-csdf-missing-method: Plot csdf object

Description Usage Arguments Value Examples

Description

A quick plotting routine to visualize TOA5 content. It requires reshape2, ggplot2, and gridExtra packages.

Usage

1
2
3
## S4 method for signature 'csdf,missing'
plot(x, y, ..., range = as.POSIXct(c("1970-01-01",
  "2037-12-31")), ncol = 2, meta = TRUE)

Arguments

x

a csdf object for quick plotting

y

ignored

...

ignored

range

timestamp range to plot, defaults to everything available (1970-2037 years, see DateTimeClasses)

ncol

number of columns to arrange plots into

meta

whether to include metadata from TOA5 header on a plot

Value

An object with S3 classes gtable, gTree, grob, and gDesc.

You can actually plot it with grid.draw. Provided p is the result, you can use max(p$grobs[[2]]$layout$t) to assess the number of panes vertically if meta is TRUE and max(p$layout$t) otherwise when deciding on the size of the device/image to plot on so panes aren't crammed.

Examples

1
2
3
4
5
6
7
Sys.setenv(TZ='GMT')
fpath <- system.file("extdata", "Station_Daily.dat", package="csdf")
obj <- read.toa5(fpath)
# call plot on csdf
p <- plot(obj, range=c("2014-05-01", "2014-06-01"))
# call grid.draw on gTree
grid::grid.draw(p)

mlt/csdf documentation built on May 23, 2019, 4:06 a.m.