Skip to contents

Often there is an intention to display not only the predictions made with a SDM, but also the uncertainty of the prediction. Uncertainty be estimated either directly by the model or by calculating the variation in prediction values among a set of models.

In particular Bayesian engines can produce not only mean estimates of fitted responses, but also pixel-based estimates of uncertainty from the posterior such as the standard deviation (SD) or the coefficient of variation of a given prediction.

This function makes use of the "biscale" R-package to create bivariate plots of the fitted distribution object, allowing to visualize two variables at once. It is mostly thought of as a convenience function to create such bivariate plots for quick visualization.

Supported Inputs are either single trained Bayesian DistributionModel with uncertainty or the output of an ensemble() call. In both cases, users have to make sure that "xvar" and "yvar" are set accordingly.


  xvar = "mean",
  yvar = "sd",
  plot = TRUE,
  fname = NULL,
  title = NULL,
  col = "BlueGold",

# S4 method for ANY,character,character,logical,ANY,ANY,character



A trained DistributionModel or alternatively a SpatRaster object with prediction model within.


A character denoting the value on the x-axis (Default: 'mean').


A character denoting the value on the y-axis (Default: 'sd').


A logical indication of whether the result is to be plotted (Default: TRUE)?


A character specifying the output filename a created figure should be written to.


Allows to respecify the title through a character (Default: NULL).


A character stating the colour palette to use. Has to be either a predefined value or a vector of colours. See "biscale::bi_pal_manual". Default: "BlueGold".


Other engine specific parameters.


Saved bivariate plot in 'fname' if specified, otherwise plot.


This function requires the biscale package to be installed. Although a work around without the package could be developed, it was not deemed necessary at this point. See also this gist.