Skip to contents

Produces a ggplot object to show the trend of the impact.

Usage

# S3 method for class 'impact_indicator'
plot(
  x,
  linewidth = 2,
  colour = "red",
  title_lab = "Impact indicator",
  y_lab = "impact score",
  text_size = 14,
  ...
)

Arguments

x

A dataframe of impact indicator. Must be a class of "impact_indicator"

linewidth

The width size of the line. Default is 2

colour

The colour of the line Default is "red"

title_lab

Title of the plot. Default is "Impact indicator"

y_lab

Label of the y-axis. Default is "impact score"

text_size

The size of the text of the plot. Default is "14"

...

Additional arguments passed to geom_line

Value

The ggplot object of the impact indicator, with the y- and x-axes representing the impact score and time respectively.

Examples

# create data_cube
acacia_cube <- taxa_cube(
  taxa = taxa_Acacia,
  region = southAfrica_sf,
  res = 0.25,
  first_year = 2010
)

# compute impact indicator
impact_value <- impact_indicator(
  cube = acacia_cube,
  impact_data = eicat_acacia,
  col_category = "impact_category",
  col_species = "scientific_name",
  col_mechanism = "impact_mechanism",
  trans = 1,
  type = "mean cumulative"
)
# plot impact indicator
plot(impact_value)