sjmgarnier / viridis

Colorblind-Friendly Color Maps for R
http://sjmgarnier.github.io/viridis
Other
294 stars 38 forks source link

When using discrete=T, scale always starts at extremes #55

Closed matthewravery closed 6 years ago

matthewravery commented 6 years ago

When using scale_colour_viridis(discrete = T), I often don't want to have the most extreme yellow as one of my three or five color choices. It's just too bright for some folks. Selecting discrete scale endpoints towards the middle of the scale or at least making this an option would be very helpful.

sjmgarnier commented 6 years ago

@matthewravery Check the begin and end arguments, I believe this is what you are looking for.

Also note that viridis and the associated color maps were designed with continuous scales in mind. The discrete option is provided for convenience/compatibility with ggplot2. There are more suitable palettes for discrete scales (e.g. see scale_color_colorblind in the ggthemes package).