shah-in-boots / EGM

Evaluation of electrophysiological signals
https://shah-in-boots.github.io/EGM/
Other
0 stars 1 forks source link

Theme/colors are not working for `ggm` objects #22

Closed shah-in-boots closed 6 months ago

shah-in-boots commented 1 year ago

When adding theme or colors to ggm objects, it appears to cause an issue with scales and palettes.

> ggm(egm) + theme_egm_dark()
Scale for colour is already present.
Adding another scale for colour, which will replace the existing scale.
Error in `palette()`:
! Insufficient values in manual scale. 4 needed but only 1 provided.
Run `rlang::last_trace()` to see where the error occurred.

Tasks:

shah-in-boots commented 1 year ago

Related to #20

shah-in-boots commented 6 months ago

By forcing the scales to match the number of potential colors with theme_egm_*(), this overrides the base colours. This may not be ideal. May want to think about splitting the theming options into a separate scale_channel_colours() style function.