rstudio / thematic

Theme ggplot2, lattice, and base graphics based on a few simple settings.
https://rstudio.github.io/thematic/
Other
244 stars 10 forks source link

README instructions on Shiny usage are confusing #94

Closed wch closed 3 years ago

wch commented 3 years ago

In the README, the example app does not use thematic, and then the paragraph below the screnshot says:

To add automatic coloring and fonts (i.e., the full auto theming experience) to the R plots, simply call thematic_on(font = "auto") and re-run the application

But that doesn't seem to work.

Then, the next code block says to use thematic::thematic_shiny(font = "auto"), which does work.

It's a bit confusing for the casual user to come in and try to find out how to make it work. I suggest adding this to the top of the example, so it's obvious how to use thematic:

# Uncomment the next line to use thematic
# thematic::thematic_shiny(font = "auto")
cpsievert commented 3 years ago

But that doesn't seem to work.

That is surprising, and I can't seem replicate -- can you consistently repro?

wch commented 3 years ago

Hm, seems to be working now. I might have been doing something wrong.

So should I be using thematic_on or thematic_shiny? I changed it in the README to thematic_shiny, but maybe that's not right?

cpsievert commented 3 years ago

thematic_on() is for general use -- it requires explicitly calling thematic_off() to disable (thematic_shiny() does that automatically in an onStop()).

I wrote the readme before thematic_shiny() existed, which is partially why the explanation is awkward. It should probably be re-written to more clearly explain the difference