jrnold / ggthemes

Additional themes, scales, and geoms for ggplot2
http://jrnold.github.io/ggthemes/
1.31k stars 229 forks source link

Add "direction" argument to scale_*_tableau() #111

Closed vadimus202 closed 5 years ago

vadimus202 commented 5 years ago

Is it possible to add direction = 1 argument to scale_fill_tableau() and scale_color_tableau() and pass it to tableau_color_pal(), which already accepts it? It would be consistent with ggplot2::scale_*_brewer().

If interested, I could give a PR a try. Seems fairly simple.

jrnold commented 5 years ago

The argument trans = reverse can be used to reverse the order of the values before mapping them to colors. See #98 for an example. I think this avoids every diverging/sequential color scale from having to have this option.

That said, if you create a PR for it, I'd accept it.

vadimus202 commented 5 years ago

Adding trans = "reverse" only works for continuous color gradients. I opened a PR, my first ever, so please bear with me. Thanks