Create a plot from a pacu object
pa_plot(x, ...)# S3 method for yield
pa_plot(
x,
...,
plot.type = c("yieldmap", "variogram", "steps"),
palette = "Temps",
main = "",
plot.var = NULL,
interactive = FALSE,
border.col = "black",
style = c("quantile", "pretty", "equal"),
scale = 1,
nbreaks = 5,
breaks = NULL,
frame = TRUE,
extent = sf::st_bbox(x[["yield"]]),
legend.outside = FALSE,
ask = TRUE
)
# S3 method for trial
pa_plot(
x,
...,
plot.type = c("trial"),
palette = "Temps",
main = "",
plot.var = NULL,
interactive = FALSE,
border.col = "black",
style = c("quantile", "pretty", "equal"),
scale = 1,
nbreaks = 5,
breaks = NULL,
frame = TRUE,
extent = sf::st_bbox(x[["trial"]]),
legend.outside = FALSE
)
# S3 method for veg.index
pa_plot(
x,
...,
palette = ifelse(plot.type == "timeseries", "Dark 2", "Temps"),
plot.type = c("spatial", "timeseries"),
main = "",
plot.var = NULL,
by = "year",
xlab = NULL,
ylab = NULL,
style = c("quantile", "pretty", "equal"),
nbreaks = 5,
border.col = "black",
frame = TRUE,
legend.outside = FALSE,
legend.title = NULL,
pch = 16
)
# S3 method for rgb
pa_plot(
x,
...,
main = "",
interactive = FALSE,
saturation = 1,
alpha = 1,
interpolate = FALSE
)
# S3 method for met
pa_plot(
x,
...,
plot.type = c("climate_normals", "monthly_distributions"),
unit.system = c("international", "standard"),
start = 1,
end = 365,
months = 1:12,
vars = c("maxt", "mint", "crain", "cradn"),
tgt.year = "last"
)
No return value, called for side effects
object to be plotted
additional arguments. None used currently.
type of plot to be produced Defaults to trial.
a string representing a color palette from hcl.pals. Defaults to ‘Temps’.
a main title for the plot
the name of the column to be plotted. Defaults to ‘yield’
logical. Whether to produce interactive plots.
color of the border for the polygons plotted in the yield map
style applied to the colors
a numerical value indicating the magnification of the graph. A value of 1 produces a plot using the default magnification. Greater values will produce zoomed in plots.
numerical value indicating the number of breaks for the color scale.
a vector indicating numerical breaks for the color scale.
logical. Whether to draw the frame around the plotting area.
a bbox object indicating the geographical area to be plotted
logical. Whether to place the legend outside of the graph.
whether to ask for user before starting a new page of output. If FALSE, plots are arranged using wrap_plots
a string or vector of strings used to group the data when plotting. Defaults to 'year'
a string used as label for x axis
a string used as label for y axis
a string used as title for the legend
an integer indicating which shape to use for points
numeric. Controls the image saturation. 0 maps to grayscale. 1 maps to the default value. See tm_rgb for details.
numeric between 0 and 1. See tm_rgb for details.
logical. Whether the raster image should be interpolated. See tm_rgb for details.
unit system to be used: international (metric) or stanrdard (imperial)
day of the year to start computing the climate normals. Defaults to 1.
day of the year to finish computing the climate normals. Defaults to 365.
a numerical vector indicating which months to produce a plot for in the case of monthly distribution plots. Defaults to 1:12.
which variables to include in the summary plot
which year to focus and compare to the historical mean. Defaults to the last year in the data set.
Caio dos Santos and Fernando Miguez
if (FALSE) {
## for examples, please see the pacu vignette
}
Run the code above in your browser using DataLab