Mikata-Project / ggthemr

Themes for ggplot2.
886 stars 107 forks source link

What is the text family? #50

Open GabriellaS-K opened 3 years ago

GabriellaS-K commented 3 years ago

Hi,

Thank you for a brilliant package! Have used it for my plots but there is one that it isn't compatible with, so I'm adjusting a few things so that graph isn't the odd one out. I found info about the colours for my chosen theme ("flat") in your documents, but I can't find what the text font is, is this something you can tell me? Thanks!

Matt-Int commented 3 years ago

Hey not sure which is the base fonts in these themes, but you should be able to add your own theme(text = element_text(family = "fonthere") which should work.

Matt-Int commented 3 years ago

Just tested it, and on linux the following bit works:

library(ggthemr)
ggthemr("flat")

ggplot(mtcars, aes(factor(vs), mpg, fill = factor(am))) + 
geom_col() +
theme(text = element_text(family = "Fira Code"))