4

I was just wondering if there is any colour palette in ggplot that works both in colour and in greyscale?

The background is that I want to submit a paper and the journal displays the online version in colour but the printed version will be black and white.

The colours are quite important in some of my figures, so I was wondering if there is some easy way to keep most of the information in the printed version.

Many thanks.

Quinten
  • 35,235
  • 5
  • 20
  • 53
Carlo
  • 135
  • 7
  • 1
    Would something like a fill pattern work? https://coolbutuseless.github.io/2020/04/01/introducing-ggpattern-pattern-fills-for-ggplot/ or https://stackoverflow.com/questions/2895319/how-to-add-texture-to-fill-colors-in-ggplot2 – Godrim May 11 '22 at 11:52
  • 2
    I might be wrong but I think the viridis color palette is made for that purpose. See `?scale_color_viridis_b`: "The viridis scales provide colour maps that are perceptually uniform in both colour and black-and-white. They are also designed to be perceived by viewers with common forms of colour blindness. See also https://bids.github.io/colormap/." – Paul May 11 '22 at 11:56
  • Consider my answer as a comment, could not add an image in comments section – Yacine Hajji May 11 '22 at 12:01
  • 2
    Why do you care about the printed version? Nobody actually reads the printed version anymore. Everyone just uses the PDF. Anyway, go to https://colorbrewer2.org, select "photocopy safe" and choose a palette you like. Then specify that palette with `scale_color_brewer`. – Roland May 11 '22 at 12:09
  • It might be useful what kind of colour palette you like to use. A categorical one? A sequential one? A divergent one? – teunbrand May 11 '22 at 14:41
  • I have got one graph in which I am using 8 discrete colours. The palette ```scale_color_viridis(discrete = TRUE, option = "H")``` works best for me and is also pretty good in black and white. So thanks for your help! – Carlo May 11 '22 at 16:03

1 Answers1

1

I think it could help to see the palettes in both raw and black&white version, like this (or with other palettes)

enter image description here

Yacine Hajji
  • 1,124
  • 1
  • 3
  • 20