View source: R/ggMap_Connectivity.R
ggMap_Connectivity | R Documentation |
Function to create a ggplot2 map object of a connectivity matrix.
ggMap_Connectivity( tbl_conn, tbl_web, bmls = NULL, maxVal = NA, valCol = "value", facetGrid = NULL, facetWrap = NULL, facetByRow = TRUE, nrow = NULL, ncol = NULL, label = "value", val_min = 0, bin_size = NULL, bin_max = NULL, max_size = 3, linewidth = NA, alpha = NA, reverse = TRUE, scale_colour = ggplot2::scale_colour_viridis_c(option = "plasma", limits = c(0, maxVal), oob = scales::squish), scale_size = ggplot2::scale_size_area(max_size = max_size, oob = scales::squish), scale_alpha = ggplot2::scale_alpha_continuous(oob = scales::squish), arrow = grid::arrow(20, grid::unit(0.15, "inches")), noAxisLabels = TRUE, plotRetentionOnly = FALSE, plotExportedOnly = FALSE )
tbl_conn |
- tibble with connectivity values to plot |
tbl_web |
- tibble representing the connectivity web |
bmls |
- list of base map layers ggplot2 layer objects |
maxVal |
- max value for scales (higher values will be set to maxVal) |
valCol |
- column name for values to plot |
facetGrid |
- formula for faceting variables using |
facetWrap |
- column name(s) for faceting variable(s) using |
facetByRow |
- flag (T/F) to arrange facets by row |
nrow |
- number of rows to arrange facets in (if facetByRow is TRUE) |
ncol |
- number of columns to arrange facets in (if facetByRow is FALSE) |
label |
- label for legends |
val_min |
- minimum value to include (0 is never included) |
bin_size |
- bin size (no binning if NULL) |
bin_max |
- max bin value, if binning applied |
max_size |
- max size for connectivity arrows |
linewidth |
- line width for fixed-width arrows |
alpha |
- transparency value for fixed-alpha symbols and arrows |
reverse |
- plot connections in reverse order (largest on bottom) |
scale_colour |
- ggplot2 colour scale for connectivity values (default = ggplot2::scale_colour_viridis_c(option="plasma",limits=c(0,maxVal))) |
scale_size |
- ggplot2 size scale for connectivity values (default = scale_size_area(max_size=max_size,oob=scales::squish)) |
scale_alpha |
- ggplot2 transparency scale for connectivity values (default = scale_alpha_continuous(oob=scales::squish)) |
arrow |
- pass result from call to |
noAxisLabels |
- flag (T/F) to include axis labels |
plotRetentionOnly |
- flag (T/F) to plot only retained proportions |
plotExportedOnly |
- flag (T/F) to plot only non-retained (exported) proportions |
Creates a ggplot2 map object representing a connectivity matrix as directed arrows from start zone locations to end zone locations.
ggplot2 map (plot) object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.