Open zeehio opened 8 years ago
Hi zeehio,
In order for your example to work correctly I wonder if your line...
# Rescale data:
scaled_data <- scales::rescale_mid(data, mid = 0)
should read...
# Rescale data:
scaled_data <- scales::rescale_mid(data_vector, mid = 0)
ie. replace data
with data_vector
Yes, sorry!
Hi, nice work on the package!
I recently discovered your package. I have a similar package named
condformat
with much less features (I can only change background gradients) but with PDF output in knitr.Looking at your source code, I found that you compute the gradient colours with the normalize function. While I was working on my package I found really useful the set of gradients used in
ggplot2
, that are created using the scales package. It offers easy to build color scales:The default palettes and options are well chosen, for instance they offer palettes for colorblind people (through the
dichromat_pal
function).Feel free to use it, if you like it. It saved me a lot of work and I feel it provides a well thought interface.