ff_plot_inv_mass.Rd
Plot all fields showing their calculated invertebrate mass production (based on acreage). The ff_calc_inv_mass
function is first run on the ff_fields
dataset using the defined number of days. Displays the watersheds, return points, and waterways on the basemap.
ff_plot_inv_mass(
day = 1,
filename = NULL,
width = NULL,
height = NULL,
units = NULL,
colors = NULL,
direction = 1
)
The day number for which to calculate the invertebrate mass. Defaults to one day.
File name to create PNG image on disk. Optional if saving the plot is desired.
Plot width in units
. If not supplied, uses the size of current graphics device.
Plot height in units
. If not supplied, uses the size of current graphics device.
Units used for the width and height ("in", "cm", "mm", or "px"). Uses default ggplot
dpi settings for resolution.
Color palette to use. Choose from either a character string indicating the viridis
color map option to use (listed below), or a named vector defining a custom continuous gradient with low
and high
or a diverging gradient with low
, mid
, and high
, e.g. colors = c(low="red", mid="white", high="blue")
. For the diverging gradient, the average value is used as the midpoint.
magma
(or A
)
inferno
(or B
)
plasma
(or C
)
viridis
(or D
)
cividis
(or E
)
rocket
(or F
)
mako
(or G
)
turbo
(or H
)
If using one of the viridis
scales for the color
option, sets the order of colors in the scale. If 1, the default, colors are ordered from darkest to lightest. If -1, the order of colors is reversed.
ff_plot_inv_mass(14)
# Choose custom colors
ff_plot_inv_mass(14, colors=c(low="darkorange", mid="lightyellow", high="darkorchid4"))
# Returns a ggplot object that can be chained to additional ggplot functions
ff_plot_inv_mass(14) + ggplot2::ggtitle("Rice Field Distances") + ggplot2::theme_void()