Mikata-Project / ggthemr

Themes for ggplot2.
886 stars 107 forks source link

Update swatches only #27

Closed jzadra closed 6 years ago

jzadra commented 6 years ago

I prefer to use ggplot2::theme_minimal(), but I need to have different colors. This is the only change I want to make. Is there some way to do this with ggthemr? When I use layout = "minimal" it still changes a number of other things about the ggplot theme.

sainathadapa commented 6 years ago

If you want to just use different colors, you can set color palette via scale_(color/fill)_manual. You do not need ggthemr for that.

jzadra commented 6 years ago

I'm trying to set a default, rather than having to add the _manual code to every plot I build.

sainathadapa commented 6 years ago

Ok. So, you either can create a custom theme using theme_minimal settings, and set the custom theme as default using ggplot2::theme_set, or you can override the ggplot's scale_* functions, like the way ggthemr does here (https://github.com/cttobin/ggthemr/blob/master/R/ggthemr.R#L57).

jzadra commented 6 years ago

Thanks, the latter should be what I need. I haven't seen any way to set colors using ggplot's custom themes - is it possible and I"m just not finding it?