openair icon indicating copy to clipboard operation
openair copied to clipboard

add textures to windRose/pollutionRose (feature request)

Open mccroweyclinton-EPA opened this issue 6 years ago • 1 comments

In an attempt to improve visibility of windrose/pollutionRose plots with people who may be visually impaired, specifically people who may be colorblind, I am requesting that an option, texture.fill=T be added to windrose/pollutionRose plots. Hopefully something like this example can be added to these functions fairly easily:

http://www.r-graph-gallery.com/193-change-texture-of-barplot-with-density/

Thank you for your time.

mccroweyclinton-EPA avatar Apr 06 '18 12:04 mccroweyclinton-EPA

The openair package uses trellis based graphics. With trellis graphics 'hatching' was deliberately left out because it is thought to create an optical illusion which distorts the data. *link

A very simple approach is available to make a windrose colorblind safe.

(1) Grab a colorblind safe pallette

cbPalette <- c("#999999", "#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7")

(2) plot the wind rose using a different colorblind safe scheme.

windRose(mydata, paddle = FALSE, dig.lab = 0, cols = cbPalette)

image

An easy enough solution would be to add a colorblind safe palette to the openColours() function. This function would need to throw a warning if too many intervals are used.

This is a good idea because many government agencies are required to make plots which take into account people who may be visually impaired.

Agriculturist avatar Apr 13 '18 19:04 Agriculturist

Closing as Jerry has got it spot on, with an additional note that openColours() supports all of the colourblind friendly "brewer" palettes (https://www.datanovia.com/en/blog/the-a-z-of-rcolorbrewer-palette/#show-only-colorblind-friendly-brewer-palettes). e.g., "Dark2".

openair::pollutionRose(openair::mydata, "nox", cols = "Dark2")

image

jack-davison avatar Feb 06 '23 13:02 jack-davison