plot_climate | R Documentation |
Plot climate variable (like MAT
, MTCO
, etc.), in addition to
latitude
and longitude
, a column with the value of var
is required.
plot_climate(
.data,
var = "mat",
units = NA,
fill_scale = ggplot2::scale_fill_viridis_d(name = toupper(var)),
size = 1,
stroke = 0.1,
legend.key.width = ggplot2::unit(1, "cm"),
legend.position = "bottom",
xlim = c(-180, 180),
ylim = c(-60, 90),
show_plot = TRUE,
elevation_cut = NULL,
land_borders = rnaturalearth::ne_countries(scale = "small", returnclass = "sf"),
land_borders_colour = "black",
land_borders_size = 0.25,
fill_land = "white",
fill_sea = "#CFE2F3",
contour = FALSE,
...
)
plot_climate_countour(
.data,
var = "mat",
units = NA,
fill_scale = ggplot2::scale_fill_gradientn(name = toupper(var), colours =
zissou1_palette()),
size = 1,
stroke = 0.5,
legend.key.width = ggplot2::unit(2, "cm"),
legend.position = "bottom",
xlim = c(-180, 180),
ylim = c(-60, 90),
show_plot = TRUE,
elevation_cut = NULL,
land_borders = rnaturalearth::ne_countries(scale = "small", returnclass = "sf"),
land_borders_colour = "black",
land_borders_size = 0.25,
fill_land = "white",
fill_sea = "#CFE2F3",
resolution = 0.5,
...
)
plot_climate_tiles(
.data,
var = "mat",
units = NA,
fill_scale = ggplot2::scale_fill_manual(name = toupper(var), values =
zissou1_palette(9)),
size = 1,
stroke = 0.1,
legend.key.width = ggplot2::unit(1, "cm"),
legend.position = "bottom",
xlim = c(-180, 180),
ylim = c(-60, 90),
show_plot = TRUE,
elevation_cut = NULL,
land_borders = rnaturalearth::ne_countries(scale = "small", returnclass = "sf"),
land_borders_colour = "black",
land_borders_size = 0.25,
fill_land = "white",
fill_sea = "#CFE2F3",
.overlay_data = NULL,
continuous = FALSE,
...
)
plot_gdd(
.data,
baseline = 0,
size = 1,
stroke = 0.1,
legend.key.width = ggplot2::unit(1, "cm"),
legend.position = "bottom",
xlim = c(-180, 180),
ylim = c(-60, 90),
show_plot = TRUE,
...
)
plot_mat(
.data,
size = 1,
stroke = 0.1,
legend.key.width = ggplot2::unit(1, "cm"),
legend.position = "bottom",
xlim = c(-180, 180),
ylim = c(-60, 90),
show_plot = TRUE,
...
)
plot_mi(
.data,
size = 1,
stroke = 0.1,
legend.key.width = ggplot2::unit(1, "cm"),
legend.position = "bottom",
xlim = c(-180, 180),
ylim = c(-60, 90),
show_plot = TRUE,
...
)
plot_mtco(
.data,
size = 1,
stroke = 0.1,
legend.key.width = ggplot2::unit(1, "cm"),
legend.position = "bottom",
xlim = c(-180, 180),
ylim = c(-60, 90),
show_plot = TRUE,
...
)
plot_mtwa(
.data,
size = 1,
stroke = 0.1,
legend.key.width = ggplot2::unit(1, "cm"),
legend.position = "bottom",
xlim = c(-180, 180),
ylim = c(-60, 90),
show_plot = TRUE,
...
)
.data |
Data frame with spatial and climate data. The following are expected:
|
var |
String with the name of the climate variable to plot. Default:
|
units |
String with the units to display next to the legend tittle.
Default: |
fill_scale |
|
size |
Numeric value for the |
stroke |
Numeric value for the |
legend.key.width |
Width of legend key ( |
legend.position |
the default position of legends ("none", "left", "right", "bottom", "top", "inside") |
xlim , ylim |
Limits for the x and y axes. These limits are specified
in the units of the default CRS. By default, this means projected coordinates
( |
show_plot |
Boolean flag to indicate whether or not the graphic should
be displayed, if |
elevation_cut |
Numeric value to use as the threshold of the elevation at which the sites will be represented with different shapes. |
land_borders |
Data frame with polygons to represent land borders
(e.g. continents, countries, counties, etc.).
Default: |
land_borders_colour |
String containing a colour code (HEX value) or
colour name, to be used as colour for the land borders.
Default: |
land_borders_size |
Numeric value of the line size to draw the land
borders. Default: |
fill_land |
String containing a colour code (HEX value) or colour
name, to be used as filling for the countries.
Default: |
fill_sea |
String containing a colour code (HEX value) or colour
name, to be used as filling for the seas
Default: |
contour |
Boolean flag to indicate if a contour should be overlaid
on the individual sites/points. It uses the function |
... |
Arguments passed on to
|
resolution |
Numeric value for the grid resolution. |
.overlay_data |
(Optional) Data frame with original observations, to be
to be overlaid on top of the tiles in |
continuous |
(Optional) Boolean flag to indicate whether or not to use
a continuous ( |
baseline |
Numeric value to be used as the baseline for the calculation
of the Growing Degree Days, default: |
ggplot
object with the plot.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.