plot_field | R Documentation |
This function is for quickly plotting a single geofield
. For geofields in
harp_grid_df
data frames or harp_list
s, extra arguments are available for
extracting the correct geofield
.
plot_field(
.fcst,
palette = viridisLite::viridis(255),
num_breaks = 15,
breaks = NULL,
legend = TRUE,
title = "auto",
zoom_centre = NULL,
zoom_length = 100,
...
)
## S3 method for class 'harp_grid_df'
plot_field(
.fcst,
palette = viridisLite::viridis(255),
num_breaks = 15,
breaks = NULL,
legend = TRUE,
title = "auto",
zoom_centre = NULL,
zoom_length = 100,
fcst_dttm,
lead_time,
filter_by = NULL,
plot_col = NULL,
...
)
## S3 method for class 'harp_list'
plot_field(
.fcst,
palette = viridisLite::viridis(255),
num_breaks = 15,
breaks = NULL,
legend = TRUE,
title = "auto",
zoom_centre = NULL,
zoom_length = 100,
fcst_model = NULL,
fcst_dttm,
lead_time,
filter_by = NULL,
plot_col = NULL,
...
)
## S3 method for class 'geofield'
plot_field(
.fcst,
palette = viridisLite::viridis(255),
num_breaks = 15,
breaks = NULL,
legend = TRUE,
title = "auto",
zoom_centre = NULL,
zoom_length = 100,
...
)
.fcst |
A |
palette |
Colour palette to use. This should be a vector of colours. |
num_breaks |
Number of colour breaks to use in the plot. |
breaks |
The values to use for colour breaks. If not NULL, breaks has priority over num_breaks. |
legend |
Logical. Whether to plot a legend. |
title |
The title of the plot. Set to "auto" to automatically generate a title. |
zoom_centre |
The centre point for a zoomed plot. Should be a 2-element vector with the longitude and latitude of the desired centre point. |
zoom_length |
A 2 element vector given the x and y lengths in number of grid squares of the zoomed plot. |
fcst_dttm |
The forecast date to plot in "YYYYMMDDhh" or similar format. Can be omitted if there is only one date in the data. |
lead_time |
The lead time to plot. Can be omitted if there is only one lead time in the data. |
filter_by |
Expressions that return a logical value wrapped inside the
|
plot_col |
The column in the data frame to take data from to plot |
fcst_model |
The fcst_model in a |
A plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.