gg_kfs_grid | R Documentation |
Plot a chloropleth surface in the KFS
gg_kfs_grid(
values,
kfs_grid = NULL,
point_size = 2.35,
color_map = "viridis",
pseudo_log = FALSE,
scale_limits = NULL,
scale_breaks = NULL,
scale_labels = NULL,
map_title = NULL,
legend_title = "Values",
lat_range = c(52.8, 53.55),
lon_range = c(-129.68, -128.85),
land_fill = I("#d5dcde"),
land_line = "grey30",
land_stroke = 0.25,
land_alpha = 1,
water_fill = "lightblue",
water_alpha = 0.1
)
values |
The vector of values to plot. Length must be same number of rows as 'kfs_grid' input. |
kfs_grid |
'data.frame' of grid coordinates, with 'x' and 'y' columns. If 'NULL', the built-in 'grid' dataset from the 'bangarang' package will be used. |
point_size |
Size of each grid point. May need to be adjusted based on output size of your plot. |
color_map |
The color palette to use from the 'viridis' package. |
pseudo_log |
Boolean; if 'TRUE', the color scale will be log-transformed to better-show minute variations at small values. Zero will still be plotted. |
scale_limits |
Two-element vector of minimum and maximum values to plot. |
scale_breaks |
Vector of values to note in the color scale legend. |
scale_labels |
Character vector corresponding to scale breaks. |
map_title |
Optional. |
legend_title |
Optional. |
lat_range |
Two-element vector of latitudinal range |
land_fill |
Land fill color |
land_line |
Land border color |
land_stroke |
Land border thickness |
land_alpha |
Land fill alpha |
water_fill |
Water fill color |
water_alpha |
Water fill alpha |
long_range |
Two-element vector of longitudinal range |
Plot.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.