Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

base_family not working in theme_economist() and theme_excel() #135

Open
adrgru opened this issue Dec 13, 2021 · 0 comments
Open

base_family not working in theme_economist() and theme_excel() #135

adrgru opened this issue Dec 13, 2021 · 0 comments

Comments

@adrgru
Copy link

adrgru commented Dec 13, 2021

I'm not sure if this only is a problem on my end: I have extrafont installed, and I have all my fonts imported into R. I'm using the latest version, 4.2.4, installed today from GitHub. I was using the CRAN version earlier and ran into the same issue.

I can successfully change the font family for all but three options: theme_economist, theme_economist_white, and theme_excel. I had originally only tried changing the font in theme_economist since it explicitly points out The Economist's use of another font. I was sure that I must have imported the fonts incorrectly, but when trying other options, they showed up as expected.

Is there something I did wrong, or is this a bug in the package? Since the code is identical save for a different option, I would have expected similar behaviour.

p2 <- ggplot(mtcars, aes(x = wt, y = mpg, colour = factor(gear))) +
    geom_point() +
    ggtitle("Cars")
p2 + scale_colour_calc() + theme_calc(base_family = "Stencil")
p2 + scale_colour_gdocs() + theme_gdocs(base_family = "Stencil")
p2 + scale_colour_economist() + theme_economist(base_family = "Stencil")
p2 + scale_colour_excel() + theme_excel(base_family = "Stencil")

(Code for p2 taken from Introduction to ggthemes)

calc
gdocs
economist
excel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant