Plot a segmetric map according to the parameter type:
"base": simple plot of the reference or segmentation polygons;
"subset": plot polygons from a subset over the base plot;
"choropleth": plot a choropleth map from polygons of a subset using
metric values.
# S3 method for segmetric
plot(
x,
type = "base",
...,
title = NULL,
layers = c("ref_sf", "seg_sf"),
background = "#FFFFFF",
ref_color = "#FF00009F",
ref_fill = "#FFFFFF00",
ref_label = "reference",
ref_size = 2,
ref_symbol = 2,
seg_color = "#0000009F",
seg_fill = "#FFFFFF00",
seg_label = "segment",
seg_size = 1,
seg_symbol = 3,
selected_fill = "#9A9AFF50",
plot_centroids = TRUE,
centroids_color = "#000000FF",
centroids_label = "centroid",
subset_id = NULL,
subset_color = "#FFFFFF00",
subset_fill = "#F0E4167F",
metric_id = NULL,
break_style = "jenks",
choropleth_palette = "YlGnBu",
choropleth_palette_reverse = FALSE,
choropleth_size = 0.1,
plot_extent = NULL,
plot_legend = TRUE,
plot_axes = TRUE
)A segmetric object.
A character. Either "base", "subset", or "choropleth".
Ignored.
A character with plot title
A character. One or both of "ref_sf" and "seg_sf"
(works only for type = "base" and type = "subset").
A character with valid color used in graph's background.
A character with a
valid hexadecimal color in rgb or rgba format. Set the border and fill
colors for reference and segmentation polygons.
A character with legend
labels for reference polygons, segmentation polygons, and centroids.
A numeric. Set symbol's size for centroids.
An integer. Symbol to represent polygons'
centroids (see pch param in points).
A character with a valid hexadecimal color in rgb
or rgba format. Set the fill color of selected reference or
segmentation polygons depending on subset_id.
A logical. Plot centroids or not.
A character with a valid hexadecimal color
in rgb or rgba format. Set the border colors for centroids.
A character with subset name
(required for type = "subset")
A character with a valid hexadecimal
color in rgb or rgba format. Set the border and fill
colors for subset polygons (works only with type = "subset").
A character with metric to be plotted in choropleth maps
(required for type = "choropleth")
A character with the name of a method to compute
the intervals for choropleth maps. Can be one of "sd", "equal",
"pretty", "quantile", "kmeans", "hclust", "bclust", "fisher",
"jenks", "dpih", and "headtails" (see style parameter in
classIntervals).
A character with a valid palette to be used
in choropleth plots.
A logical indicating if palette should
be generated in reversely.
A numeric with border size used to plot polygons.
A sf object. Set the map extent for a plot.
A logical. Plot legend or not.
A logical. Plot coordinates axis or not.