plot_diagnostic: Quick diagnostic plotting function

View source: R/plotting.R

plot_diagnosticR Documentation

Quick diagnostic plotting function

Description

Takes a data table that contains cols Lon, Lat (or lon and lat) and a variable to plot.

Usage

plot_diagnostic(
  dt,
  var = colnames(dt)[3],
  mn = var,
  rr = NULL,
  col_scheme = "bwr",
  set_white = NULL,
  xlab = "",
  ylab = "",
  save_pdf = FALSE,
  save_dir = "./figures/",
  file_name = "diag_plot",
  stretch_par = NULL,
  legend = TRUE
)

Arguments

dt

The data table.

var

Character string. The name of the column containing the values for the plot. Default is third column, for subset data tables of the form .(Lon,Lat,var).

mn

Title of the plot.

col_scheme

Either "bwr" for blue - white - red, "wr" for white - red, or "wb" for white - blue. Specifies the color scheme of the plot.

set_white

Forces the blue-white-red color scheme to center white at the set value if specified.

xlab, ylab

Labeling.

save_pdf, save_dir, file_name

Whether, where and under which name the plot should be saved.

stretch_par

Numeric. Only used when save_pdf == TRUE. Stretches the pdf output. Default is NULL, where it is stretched to #Lons/#Lats.

legend

Boolean. if FALSE, no legend is provided

Value

none

Author(s)

Claudio Heinrich

Examples

## Not run: 
dt = load_combined_wide()
plot_diagnostic(dt)

## End(Not run)


SeasonalForecastingEngine/ForecastTools documentation built on Oct. 20, 2024, 9:10 a.m.