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

[Feature Request] Adding custom themes #151

Open
mertgoksel opened this issue Apr 19, 2021 · 1 comment
Open

[Feature Request] Adding custom themes #151

mertgoksel opened this issue Apr 19, 2021 · 1 comment

Comments

@mertgoksel
Copy link

There is currently only 8 themes in esquesse but all of them are near identical. If we can add themes of our own or from other packages the generated plots would look much cooler and unique.

@pvictor
Copy link
Member

pvictor commented Apr 19, 2021

Hello,

You can install packages ggthemes and hrbrthemes to have more pre-built themes available.

If you want to use a custom theme, you can do:

theme_custom <- function() {
  ggplot2::theme(
    plot.background = ggplot2::element_rect(fill = "lightblue"),
    panel.background = ggplot2::element_rect(fill = "yellow")
  )
}

options("esquisse.themes" = list(
  custom = list("theme_custom"),
  ggplot2 =  c("bw", "classic", "dark", "gray",
               "light", "linedraw", "minimal",
               "void")
))

esquisse::esquisser(mtcars)

The only constraint is that your theme must start with theme_*.

Victor

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

2 participants