I believe Grattan's scale function can do this, but it would require us to reengineer scale_colour_e61() to work the way theirs does.
Seems to use ggplot2::discrete_scale which requires us to supply 2 new/changed things: a scale_name, which needs to be something called e61_palette which is a list of colours, and a palette, which might work with the existing scale_colour_e61 and needs to return a vector of colours given an integer argument.
I believe Grattan's scale function can do this, but it would require us to reengineer
scale_colour_e61()
to work the way theirs does.Seems to use
ggplot2::discrete_scale
which requires us to supply 2 new/changed things: ascale_name
, which needs to be something callede61_palette
which is a list of colours, and apalette
, which might work with the existingscale_colour_e61
and needs to return a vector of colours given an integer argument.Links for reference:
https://github.com/grattan/grattantheme/tree/master/R https://github.com/grattan/grattantheme/blob/master/R/grattan_pal.R https://github.com/grattan/grattantheme/blob/master/R/grattan_scales.R