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

Use minimal theme by default ? #223

Closed
IndrajeetPatil opened this issue Mar 4, 2022 · 2 comments
Closed

Use minimal theme by default ? #223

IndrajeetPatil opened this issue Mar 4, 2022 · 2 comments

Comments

@IndrajeetPatil
Copy link
Member

IndrajeetPatil commented Mar 4, 2022

IMHO, most of the defaults for tlf plot themes are unnecessarily complex. I would personally recommend scaling down this complexity and adopting more minimal themes, which are easier for the reader to understand.

I know that the users can use their own theme to customize the plots, but we should be doing whatever we can to provide custom settings that reduces this extra work for the user.

For example, box plot defaults

image

Can be something like this:

library(ggplot2)

boxData <- data.frame(x = c(rep("A", 500), rep("B",500)), y = rlnorm(1000))

ggplot(boxData, aes(x, y)) +
  geom_boxplot() +
  theme_minimal()

Created on 2022-03-04 by the reprex package (v2.0.1.9000)

Here is another example with histogram

image

which, with a minimal theme, can look something like the following:

library(ggplot2)

histData <- data.frame(x = rnorm(100))

ggplot(histData, aes(x)) +
  geom_histogram(color = "black") +
  theme_minimal()
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Created on 2022-03-04 by the reprex package (v2.0.1.9000)

@IndrajeetPatil
Copy link
Member Author

Alternatively, you can also just soften the existing grid:

image

@PavelBal
Copy link
Member

@IndrajeetPatil I like your suggestions for the default plots.

Also - no grid by default.

pchelle added a commit to pchelle/TLF-Library that referenced this issue Mar 31, 2022
@Yuri05 Yuri05 closed this as completed in 5bb0219 Mar 31, 2022
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