Creates a facet plot with lakes faceted horizontally and error estimates faceted vertically.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | plot_nyear(
df_box,
df_point,
df_point_short = NULL,
metric_name,
metric_title = "",
variable_title = "",
variable_breaks = "sort",
variable_labels,
value_title = "",
convert_units = "",
point_color = "#c00000",
point_size = 2,
text_size = 12,
same_range = TRUE,
ytick_precision = 0.5,
rotate_xticks = FALSE,
pfl_is_long = FALSE
)
|
df_box |
data frame with the following columns for a shortened timeseries:
|
df_point |
data frame with the following columns for the entire timeseries:
|
df_point_short |
optional data frame defaults to NULL, but if provided includes the lake, metric, variable, and value for a specific simulation. |
metric_name |
name of metric to display on this plot |
metric_title |
string to use for plot title, defaults to "" for no title |
variable_title |
string to use for color legend, defaults to "" for no title |
variable_breaks |
vector with values to use for variable breaks in color legend. Defaults to "sort" to convert unique options in "variable" column to numeric values and sort in ascending order. |
variable_labels |
vector with strings to use for variable labels in color legend. Defaults to "breaks" to indicate use same values as breaks. Can also be "percent" to add a percent symbol to values in variable_breaks. |
value_title |
label for y-axis values |
convert_units |
logical defulats to "". If "metersTOft", converts values from meters to feet. |
point_color |
color of points, defaults to "#c00000" |
point_size |
size of points, defaults to 2, |
text_size |
size of text on plots. Defaults to 12. |
same_range |
logical defaults to TRUE to indicate all subplots should have the same range in y. If FALSE |
ytick_precision |
indicates precision of rounding, defaults to 0.5. Only used if same_range is TRUE. |
rotate_xticks |
defaults to FALSE. If TRUE, rotates x tick lables 90 degrees |
pfl_is_long |
logical defaults to FALSE to indicate Plainfield and Long can retain independent ranges. Only used if same_range is TRUE. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.