bubble_plot: Plot forecasts (with forecast skill)

Description Usage Arguments Details Examples

Description

Plot category forecasts with shading according to the dominant forecast category. Alternatively, point size reflective of forecast skill can be used. map_forecast plots the forecasts (with points sizes corresponding to forecast skill), bubble_plot also plots the legends.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
map_forecast(lon, lat, x, color = NULL, breaks = NULL, skill = NULL,
  type = c("area", "edge"), plot = TRUE, ...)

bubble_plot(lon, lat, x, color = NULL, breaks = NULL, skill = NULL,
  type = "area", labels = NULL, ...)

skillLegend(args, legend.pos = "bottomleft", width = 0.2, height = 0.15,
  inset = 0.01, skill.levs = c(0.2, 0.5, 0.8), skill.col = "grey",
  byrow = TRUE, bbox = FALSE, font.main = par("font.main"),
  cex.main = par("cex.main"), cex = par("cex.lab"),
  font = par("font.lab"))

Arguments

lon

longitudes of the forecast array

lat

latitutdes of forecast array

x

three-dimensional array of forecast probabilities (in percent) with dimensions forecast categories x lon x lat

color

matrix of color for breaks (see details)

breaks

matrix of breaks (see details)

skill

two or three-dimensional array of forecast skill with dimenisions lon x lat (2d) or forecast cat. x lon x lat (3d)

type

specify whether skill information should be represented by grid point area (type = "area", the default) or grid point width and height (type = "edge").

plot

logical, should plot be generated or just a dry run be performed to enquire parameters?

...

additional parameters passed to image

labels

Vector of category labels for legend (e.g. below normal, normal, above normal)

args

output from map_project. List with at least type and londiff and latdiff vectors

legend.pos

position of inset legend on plot

width

width of legend expressed as a fraction of the plot

height

height of legend expressed as a fraction

inset

additional spacing to offset legend from border

skill.levs

skill levels to be plotted

skill.col

colour for skill bubbles

byrow

logical, should skill labels be shown in one row?

bbox

logcial, should bounding box be added?

font.main

font of the legend header

cex.main

character expansion of legend header

cex

character expansion of legend text

font

font of legend text

Details

color and breaks for the forecast are supplied as a matrix with the number of columns corresponding to the forecast categories. If no breaks are supplied, breaks are set automatically with the lowest probability at ceiling(1/n*10)*10. If category forecasts with unequal climatological expected frequency are used, breaks should be provided.

Examples

1
2
3
4
5
6
## Not run: 
tmp <- bubble_plot(lon, lat, fcst, skill=skill)
map(add=T) ## add in map for forecast
skillLegend(tmp) ## add in inset legend for skill

## End(Not run)

jonasbhend/myhelpers documentation built on May 19, 2019, 7:27 p.m.