PlotMap_Fn: Plot maps with areal results

View source: R/deprecated.R

PlotMap_FnR Documentation

Plot maps with areal results

Description

PlotMap_Fn is a hidden function to plot a map and fill in regions with colors to represent intensity in an areal-interpretion of model results

Usage

PlotMap_Fn(
  MappingDetails,
  Mat,
  PlotDF,
  MapSizeRatio = c(`Width(in)` = 4, `Height(in)` = 4),
  Xlim,
  Ylim,
  FileName = paste0(getwd(), "/"),
  Year_Set,
  Rescale = FALSE,
  Rotate = 0,
  Format = "png",
  Res = 200,
  zone = NA,
  Cex = 0.01,
  textmargin = "",
  add = FALSE,
  pch = 15,
  outermargintext = c("Eastings", "Northings"),
  zlim = NULL,
  Col = NULL,
  Legend = list(use = FALSE, x = c(10, 30), y = c(10, 30)),
  mfrow = c(1, 1),
  plot_legend_fig = TRUE,
  land_color = "grey",
  ignore.na = FALSE,
  map_style = "rescale",
  ...
)

Arguments

MapSizeRatio

Default size for each panel

zlim

two numeric values, specifying range for defining bounds of color scale. If zlim=NULL, then a constant scale is inferred from the range of the plotted variable and a color-legend is plotted in the last panel. If zlim=NA then a different range is used in each panel from the range of Y_gt[,t] and a color-legend is plotted in every panel.

plot_legend_fig

Boolean, whether to plot a separate figure for the heatmap legend or not

land_color

color for filling in land (use land_color=rgb(0,0,0,alpha=0) for transparent land)

...

arguments passed to par

Details

This function was necessary to build because mapproj::mapproject as used in maps::map has difficulties with both rotations (for most projections) and truncating the cocuntry boundaries within the plotting region (which mapproj::mapproject appears to do prior to projection, so that the post-projection is often missing boundaries that are within the plotting rectangle). I use rectangular projections by default, but Lamberts or Albers conformal projections would also be useful for many cases.


James-Thorson/FishStatsUtils documentation built on July 21, 2024, 2:17 a.m.