-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
I want to change the color scale based on a hex code color I provide.
For example below the color_scale argument takes a value based on available color palette from RColorBrewer library
library(bupaR)
patients %>%
process_map(type = frequency("relative_case", color_scale = "Purples"))
Is there any way that I can create a custom palette which is not part of the RColorBrewer palette (RColorBrewer::brewer.pal.info) so that it can be an input to the process_map color_scale argument?
For example, I want the color scale to be generated based on this hexcode #004b88.
If I simply replace the hexcode as below, I would get the following error which suggests that I'm only bounded by whatever color palettes provided by RColorBrewer which I think shouldn't be the case
> patients %>%
+ process_map(type = frequency("relative_case", color_scale = "#004b88"))
Error: `colorize_node_attrs()` REASON:
* The color palette is not an `RColorBrewer` or `viridis` palette`()` REASON:
* The color palette is not an `RColorBrewer` or `viridis` palette`()` REASON:
* The color palette is not an `RColorBrewer` or `viridis` palette
Metadata
Metadata
Assignees
Labels
No labels