plot_hisafe_voxels: Tile plot of Hi-sAFe voxels output variable

Description Usage Arguments Value See Also Examples

View source: R/plot.R

Description

Plots a tile plot of a single Hi-sAFe voxels output variable. If a single date is provided, SimulationName is used as the column facet. Otherwise, Date is used as the column facet.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
plot_hisafe_voxels(
  hop,
  variable,
  date.min = NA,
  date.max = NA,
  simu.names = "all",
  X = NA,
  Y = NA,
  Z = NA,
  summarize.by = "z",
  facet.simu = TRUE,
  facet.z = FALSE,
  vline.dates = NA,
  plot = TRUE
)

Arguments

hop

An object of class hop.

variable

A character string of the name of the variable to plot.

date.min

A character vector containing the minimum date (yyyy-mm-dd) to include. If NA, the default, than the minimum value in the voxels profile is used

date.max

A character vector containing the minimum date (yyyy-mm-dd) to include. If NA, the default, than the maximum value in the voxels profile is used

simu.names

A character string containing the SimulationNames to include. Use "all" to include all available values.

X

A numeric vector of the x values of the voxels to include. If NA, the default, then all x values are used.

Y

A numeric vector of the y values of the voxels to include. If NA, the default, then all y values are used.

Z

A numeric vector of the z values of the voxels to include. If NA, the default, then all z values are used.

summarize.by

One of 'x', 'y', or 'z', indicating an axis over which to average voxel values. If NA, the default, then no averaging is done and each voxel is plotted as its own line.

vline.dates

A character vector of dates (yyyy-mm-dd) at which to plot dashed vertical reference lines. If NA, the default, then no reference lines are drawn.

plot

If TRUE, the default, a ggplot object is returned. If FALSE, the data that would create the plot is returned.

Value

Returns ggplot object.

See Also

Other hisafe plot functions: plot_hisafe_annualcells(), plot_hisafe_bg(), plot_hisafe_cells(), plot_hisafe_monthcells(), plot_hisafe_scene(), plot_hisafe_tstress(), plot_hisafe_ts()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# After reading in Hi-sAFe simulation data via:
mydata <- read_hisafe(path = "./")

# You can create a tile plot of waterAvailable:
tile.plot <- plot_hisafe_voxels(mydata, "waterAvailable", paste(1998, 6:8, 1, sep = "-"))

# Once you have the plot object, you can display it and save it:
tile.plot
ggsave_fitmax("tiled_waterAvailable.png", tile.plot)

## End(Not run)

kevinwolz/hisafer documentation built on Oct. 19, 2020, 4:43 p.m.