Description Usage Arguments Details References See Also
View source: R/climate.stripes.r
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
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 |
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.
https://www.climate-lab-book.ac.uk/2018/warming-stripes/
plot par rect colour.gradient.legend.f
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.