plotRadar: Radar plot

Description Usage Arguments Value Examples

View source: R/plotRadar.R

Description

This function generates a radar plot. Note that PMs on different scales (e.g. proportional abundance vs. absolute abundance) should not be plotted together. If it shouldn't share a y-axis label, it shouldn't be in a radar plot! Also cannot facet so should only be passed one OM and multiple MPs or vice versa. Includes helper function coordRadar.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
plotRadar(
  dat,
  xLab,
  plotVars = NULL,
  groupingVar = NULL,
  cu = FALSE,
  mainLab = NULL,
  legendLab = NULL,
  axisSize = 13
)

Arguments

dat

Dataframe generated by buildCUDat.

xLab

A character representing the x axis label.

plotVars

A character value corresponding to PM in cuDat$vars (can be either catch- or conservation-based).

groupingVar

A character value that can take the values: "mp", "om" and specifies along which categorical variable dot plots should be grouped.

cu

A logical representing if data are segreated by CUs (Conservation Units).

mainLab

A character representing the main label.

legendLab

A character representing the legend title.

axisSize

A number representing the font size for the axis labels.

Value

Returns a ggplot object.

Examples

1
2
3
4
5
6
trimDat <- agPlottingDF %>%
  dplyr::filter(var %in% c("ppnCULower", "ppnCUStable", "ppnFisheriesOpen")) %>%
  dplyr::mutate(var = factor(var))
plotRadar(trimDat, xLab = c("CUs\nLower BM", "CUs\nStable", "Fisheries\n Open"),
          plotVars = NULL, groupingVar = NULL, cu = FALSE,
          legendLab = "Proportion\nTAC in\nMixed Catch", axisSize = 13)

TESA-workshops/TESAsamSim documentation built on Feb. 6, 2021, 12:25 a.m.