plot_hisafe_annualcells: Tile plot of Hi-sAFe annualCells output variable

Description Usage Arguments Details Value See Also Examples

View source: R/plot.R

Description

Plots a tile plot of a single Hi-sAFe annualCells output variable.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
plot_hisafe_annualcells(
  hop,
  variable = "yieldMax",
  simu.names = "all",
  years,
  plot.x = "x",
  trees = TRUE,
  canopies = TRUE,
  plot = TRUE
)

Arguments

hop

An object of class hop.

variable

A character string of the name of the variable to color the tiles.

simu.names

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

years

A numeric vector of the years within hop to include. Use "all" to include all available values.

plot.x

Either "x" or "y", indicating which axis of the simulation scene should be plotted on the x-axis of the plot.

trees

Logical indicating if a point should be plotted at the location of each tree.

canopies

Logical indicating if an elipsoid should be plotted representing the size of each tree canopy.

plot

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

Details

This function is very picky! You can only facet by two of the three manipulable variables: SimulationName, Year, Month. You must ensure that the one varibale not used for faceting is fixed at a single value.

Value

Returns a ggplot object.

See Also

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

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 monthDirectParIncident:
tile.plot <- plot_hisafe_annualcells(mydata, "yieldMax")

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

## End(Not run)

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