climate.col.stripes.f: Draws climate stripes given a time vector and environmental...

Description Usage Arguments Details References See Also

View source: R/climate.stripes.r

Description

Climate stripes are a simple way of showing how temperature (or any other time series) has changed over time. They are usually drawn for a temperature time series with blue being the coldest years and red being the warmest. They offer a relatively uncluttered depiction of a temperature over time that can be grasped almost immediately and are good at showing climate change from long time series.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
climate.col.stripes.f(
  time.vector,
  temperature.vector,
  colour.vec = c("blue", "red"),
  title = "",
  time.scale = T,
  legend = T,
  text.col.legend = "yellow",
  na.colour = "white",
  n.categories.legend = 500,
  legend.xpos = c(NA, NA),
  ...
)

Arguments

time.vector

the time series vector

temperature.vector

a times series of any environmental variable (climate stripes have been developed for temperature) whose values correspond to the time vector

colour.vec

a vector of colours to ramp between (see colorRampPalette, "colors")

title

a title for the colour stripes plot if you want one

time.scale

show a temporal axis. Default TRUE

legend

puts a legend for the colour gradient on the top right of the plot with the lowest and highest values shown. Default TRUE

text.col.legend

colour of the legend text

na.colour

colour to display for na in the time series

n.categories.legend

the number of colour categories you want to show in the legend, default=500 (large numbers smooth it). Careful trying to make only a few discrete categories, you can get some peculiar looking legends.

legend.xpos

the left and right x coordinates of the legend bar (same units as your time axis)

...

additional arguments that plot will accept, see par

Details

This plot will always use both end of the colour series provided. So if your colours were blue and red and you had a two years times series then one stripe will be blue and the other red. i.e. the plots are meant to show changes not absolutes. This is a good reason why a legend might be excluded. They are usually not for communication to scienific audiences unless in as a quick slide in a presentation so consider not cluttering up the image with a legend and perhaps not even an axis.

Missing points in the time series should be NA for the variable. They are depicted as white spaces on the climate stripes plot. You will not get an error with missing points in the time series but it will show the stipes of the preceeding time series point to be wider. It is also deceptive to not include missing data.

References

https://www.climate-lab-book.ac.uk/2018/warming-stripes/

See Also

plot par rect colour.gradient.legend.f


duplisea/climatestripes documentation built on March 27, 2021, 11:47 p.m.