Taylor Diagram

Authors

[Editor] Hu Zheng;

[Contributors]

Modified

2026-02-03

Note

Hiplot website

This page is the tutorial for source code version of the Hiplot Taylor Diagram plugin. You can also use the Hiplot website to achieve no code ploting. For more information please see the following link:

https://hiplot.cn/basic/taylor-diagram?lang=en

It can be used to display the standard deviation (SD), root mean square (RMS) error and correlation coefficient of the models simultaneously.

Setup

  • System Requirements: Cross-platform (Linux/MacOS/Windows)

  • Programming language: R

  • Dependent packages: openair

# Install packages
if (!requireNamespace("openair", quietly = TRUE)) {
  install.packages("openair")
}

# Load packages
library(openair)
sessioninfo::session_info("attached")
─ Session info ───────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.5.2 (2025-10-31)
 os       Ubuntu 24.04.3 LTS
 system   x86_64, linux-gnu
 ui       X11
 language (EN)
 collate  C.UTF-8
 ctype    C.UTF-8
 tz       UTC
 date     2026-02-03
 pandoc   3.1.3 @ /usr/bin/ (via rmarkdown)
 quarto   1.8.27 @ /usr/local/bin/quarto

─ Packages ───────────────────────────────────────────────────────────────────
 package * version date (UTC) lib source
 openair * 2.19.0  2025-08-28 [1] RSPM

 [1] /home/runner/work/_temp/Library
 [2] /opt/R/4.5.2/lib/R/site-library
 [3] /opt/R/4.5.2/lib/R/library
 * ── Packages attached to the search path.

──────────────────────────────────────────────────────────────────────────────

Data Preparation

# Load data
dat <- selectByDate(mydata, year = 2003)

# convert data structure
dat <- data.frame(date = mydata$date, obs = mydata$nox, mod = mydata$nox)
dat <- transform(dat, month = as.numeric(format(date, "%m")))
mod1 <- transform(dat, mod = mod + 10 * month + 10 * month * rnorm(nrow(dat)),
model = "model 1")
mod1 <- transform(mod1, mod = c(mod[5:length(mod)], mod[(length(mod) - 3) :
length(mod)]))
mod2 <- transform(dat, mod = mod + 7 * month + 7 * month * rnorm(nrow(dat)),
model = "model 2")
mod3 <- transform(dat, mod = mod + 3 * month + 3 * month * rnorm(nrow(dat)),
model = "model 3")
mod.dat <- rbind(mod1, mod2, mod3)

# View data
head(mod.dat)
                 date obs      mod month   model
1 1998-01-01 00:00:00 285 479.8606     1 model 1
2 1998-01-01 01:00:00  NA 293.9877     1 model 1
3 1998-01-01 02:00:00  NA 184.2482     1 model 1
4 1998-01-01 03:00:00 493 198.0124     1 model 1
5 1998-01-01 04:00:00 468 160.3792     1 model 1
6 1998-01-01 05:00:00 264 123.7977     1 model 1

Visualization

# Taylor Diagram
TaylorDiagram(mod.dat, obs = "obs", mod = "mod", group = "model",
              main = "Taylor diagram", 
              cols = c("#00468BFF","#8e6097","#BFACF0FF"))
FigureΒ 1: Taylor Diagram