kwstat / pals

Color Palettes and Palette Evaluation Tools
https://kwstat.github.io/pals/
Other
82 stars 4 forks source link

bivariate palettes: flexible n #7

Closed mtennekes closed 11 months ago

mtennekes commented 3 years ago

Hi, a feature request:

The bivariate palettes have a fixed n. It would be great to be able to set this, preferably for the number of rows and columns. E.g. arc.bluepink(n = 4, m = 5) should create a palette of 4 x 5 colors.

I think it is easy to implement using colorRampPalette, first in one dimension, then in the other dimension.

kwstat commented 3 years ago

It's not quite that simple, because the two 1-D palettes have to be blended together for a 2-D palette. Here's a blog post that talks about creating bivariate palettes: https://www.datalorax.com/post/creating-bivariate-color-palettes/ Also: https://www.tableau.com/about/blog/2018/2/how-make-effective-bivariate-choropleth-maps-tableau-83121

kwstat commented 11 months ago

Not so simple.