Description Usage Arguments Value Examples
View source: R/quick_plot_field.R
Uses the output of read_members
to quickly plot a field with a
coastline map
1 2 3 |
eps_field |
Output of |
member |
Member to plot. Can be numeric or one of "mean", "sd", or "all". |
legend |
Whether to plot a legend - TRUE or FALSE. Defaults to TRUE. |
hires_coast |
Plot a high resolution coastline - TRUE or FALSE. Defaults to FALSE. |
col |
Colour palette, i.e. a vector of colours. If breaks are specified there must be fewer colours than breaks. |
num_rows |
Number of rows in a multi member plot. |
diff |
Whether to plot the difference between 2 members. TRUE or FALSE.
Only works if exactly 2 members are specified in the |
land_colour |
Fill colour for land in the plot. Default is transparent. |
... |
Arguments for |
A plot
1 2 3 4 5 6 7 8 9 10 11 12 13 | my_file <- get_data_filename(20180101, 0)
t2m <- read_members(my_file, "T2m", lead_time = 0)
quick_plot_field(t2m, 0)
breaks <- c(-50, -40, - 30, seq(-20, 15, 5))
colour_palette <- c("blue", "skyblue", "lightgreen", "green", "yellow", "gold")
colours <- colorRampPalette(colour_palette)(length(breaks) - 1)
quick_plot_field(t2m, 0, col = colours, breaks = breaks, lab.breaks = breaks)
library(viridis)
quick_plot_field(t2m, 0, hires = TRUE, col = viridis(256))
quick_plot_field(t2m, "all", legend = FALSE, num_rows = 2, col = viridis(256))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.