dreamRs / esquisse

RStudio add-in to make plots interactively with ggplot2
https://dreamrs.github.io/esquisse
Other
1.78k stars 229 forks source link

Feature Idea: add the option "base_size" to the ggplot themes #156

Open frajuegies opened 3 years ago

frajuegies commented 3 years ago

Hi, I just updated to version 1.01 and I am really happy with the addded features.

Quite often I simply used esquisser() to have a first look into a dataset.

Esquisse allows to change text sizes... but I have not found a way -by using the interactive tool only- to change the text size of the axis tick labels and the legend. "Normally" I would cover all these components (as well) by using the option_"base_size" available for the standard ggplot themes (like theme_bw()).

Have I overseen something?

Thank you very much for the very nice package!!

Best regards, Jürgen

frajuegies commented 3 years ago

Dear all,

I just found #151 ..... which explains the creation of customized themes. So my problem is solved by using this approach:

library (esquisse)

theme_bw_20 <- function() {
  ggplot2::theme_bw(base_size=20)
}

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

plot(esquisser(knime.in))

... and you see that I sometimes use esquisse as interactive plotting tool in KNIME (www.knime.org).

Best regards,

Jürgen

frajuegies commented 3 years ago

One additional question... Do you have a documentation of the options (like “esquisse.themes”)? It would be nice to set upfront e.g a custom color palette and the size of the points in a scatterplot.

Thank you very much !

Best regards, Jürgen

pvictor commented 3 years ago

Hello,

Ah yes, it could be interesting to add an input to set base_size option... Your solution is cool no, there is no documentation for these options yet... I'll write a vignette to explain how to use them I'll add an option for default point size in scatter plot, nice idea And I'll consider adding something like theme_register maybe to easily add a custom theme.

Best,

Victor