create_bio_aboveground_barplot: create plot "p"

View source: R/plot_gdm_FUN.R

create_bio_aboveground_barplotR Documentation

create plot "p"

Description

code to create plot p : bio and aboveground

Usage

create_bio_aboveground_barplot(
  type = c("grouped", "stacked"),
  yvar_name = "maxsplines",
  plottitle = model_names_selection$modelname,
  errorbar = F,
  pylim = c(0, 0.44)
)

Arguments

type

is either "grouped", where turnover and nestedness components are shown in individual bars, or "stacked", where turnover and nestedness components are stacked on top of each other.

yvar_name

character vector defining the column name of y values. Defaults to "maxsplines" as created in 'create_restab0'.

plottitle

defaults to 'model_names_selection$modelname' which is the current model name as comes out of the pipeline in basic GDM barplots. Can be changed, e.g. to plot threshold avg models

errorbar

logical T or F. If T, error bars (standard errors) are shown. The name of the errorbar is assumed to be "se_" yvar_name as in 'paste0("se_", yvar_name)' Note that error bars only look good if type is "grouped"

pylim

the limits of the y axis. defaults to 0 and 0.44. Note that if errorbars are plotted, it might be better to set them to ylim = c(-0.22, 0.44)

Details

Prerequisite : a dataset stored in environment called 'restab', containing the plot data


allanecology/BetaDivMultifun documentation built on Nov. 9, 2023, 8:47 p.m.