tpalette function

Draw a palette of the colours assigned to ternary forecasts

Draw a palette of the colours assigned to ternary forecasts

Function to fill barycentric coordinates with a colour palette.

tpalette(q = cbind(1, 1, 1)/3, bars = TRUE, m = 0.7, flip = FALSE, lmain = FALSE, theta0 = 0, dich = "none", cex = 1, nhist = 12)

Arguments

  • q: A 1-by-3 matrix containing a climatology.
  • bars: Logical. If "FALSE" a simple colour palette is produced. If "TRUE" barplots representing the forecasts are overlain.
  • m: Parameter controlling the rate at which colours saturate towards the corners of the triangle.
  • flip: Logical to transpose categories "B" and "A" in barycentric coordinates.
  • lmain: Logical. If "TRUE" text is overlaid.
  • theta0: Angle (degrees) through which to rotate colour palette around climatology q in barycentric coordinates.
  • dich: Option to render colours as they would appear to a dichromat. Default choice dich = "none" leaves colours unchanged. Choices dich = "deutan" and dich = "protan" show colours as they would appear to those with deutanopia or protanopia (see dichromat).
  • cex: Factor for expanding the size of the dots when bars is "FALSE".
  • nhist: Number of barplots along each side of the triangle when bars is "TRUE".

References

Jupp TE, Lowe R, Stephenson DB, Coelho CAS (2012) On the visualization, verification and recalibration of ternary probabilistic forecasts, Philosophical Transactions of the Royal Society, volume 370, pages 1100-1120.

https://rsta.royalsocietypublishing.org/content/370/1962/1100.full/

https://arxiv.org/abs/1103.1303/

Author(s)

Tim Jupp

See Also

tmap

Examples

dev.new() tpalette(bars=FALSE) # standard palette dev.new() tpalette(bars=TRUE) # palette with histograms overlaid
  • Maintainer: Tim Jupp
  • License: GPL-2
  • Last published: 2025-03-28

Useful links