Plot the distribution and responses of the studied taxa

plot_taxaCharacteristics(
  x,
  taxanames = x$inputs$taxa.name,
  climate = x$parameters$climate,
  col.density = viridis::plasma(20)[5:20],
  col.climate = viridis::viridis(22)[3:20],
  save = FALSE,
  filename = "taxaCharacteristics.pdf",
  as.png = FALSE,
  png.res = 300,
  width = 7.48,
  w0 = 0.2,
  height = 3 * length(climate) + h0,
  h0 = 0.4,
  add_modern = FALSE,
  resol = 0.25
)

Arguments

x

A crestObj generated by either the crest.calibrate, crest.reconstruct, loo or crest functions.

taxanames

A list of taxa to use for the plot (default is all the recorded taxa).

climate

Climate variables to be used to generate the plot. By default all the variables are included.

col.density

The colour gradient to use to map the density of species (top left map).

col.climate

The colour gradient to use to map the climate gradients (left column).

save

A boolean to indicate if the diagram should be saved as a pdf file. Default is FALSE.

filename

An absolute or relative path that indicates where the diagram should be saved. Also used to specify the name of the file. Default: the file is saved in the working directory under the name 'taxaCharacteristics.pdf'.

as.png

A boolean to indicate if the output should be saved as a png. Default is FALSE and the figure is saved as a pdf file.

png.res

The resolution of the png file (default 300 pixels per inch).

width

The width of the output file in inches (default 7.48in ~ 19cm).

w0

The width of the left column with the names.

height

The height of the output file in inches (default 3in ~ 7.6cm per variables).

h0

The vertical space used for the x-axes.

add_modern

A boolean to add the location and the modern climate values to the plot (default FALSE).

resol

For advanced users only: if higher resolution data are used to estimate the pdfs, use this parameter to define the resolution of the maps on the figures. (default is 0.25 degrees to match with the default database)

Value

No return value, this function is used to plot.

Examples

if (FALSE) {
  data(crest_ex_pse)
  data(crest_ex_selection)
  reconstr <- crest.get_modern_data(
    pse = crest_ex_pse, taxaType = 0, df = crest_ex,
    climate = c("bio1", "bio12"),
    selectedTaxa = crest_ex_selection, dbname = "crest_example"
  )
  reconstr <- crest.calibrate(reconstr,
    geoWeighting = TRUE, climateSpaceWeighting = TRUE,
    bin_width = c(2, 20), shape = c("normal", "lognormal")
  )
  plot_taxaCharacteristics(reconstr, taxanames='Taxon1')
}