quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.62k stars 296 forks source link

Auto-theming ggplot2 figures #482

Open py9mrg opened 2 years ago

py9mrg commented 2 years ago

Hello,

Not sure this is the right place so feel free to ask me to move this to bslib or thematic. But is it possible to support something like thematic::thematic_rmd(font = "auto") in Quarto?

dragonstyle commented 2 years ago

We currently don't support automatic theming of plots using thematic (because the automatic theme discovery it does doesn't work within Quarto and we don't currently explicitly pass theme info). This is something we plan to support however, though I can't commit exact timing. You could pass theme color directly in the meantime, though I realize that this isn't ideal...

py9mrg commented 2 years ago

No worries, as helpful as thematic is it's not a huge issue to go back to manual ggplot2 theming. I wonder if maybe it might be easier for thematic to produce something like thematic::thematic_qmd anyway. FWIW I have been playing around with Quarto for a couple of days now and I really like the direction it's taking - not least the fact that a lot of this sort of stuff is being pulled into the main package so will be more simplified and require less knowledge of other packages (and I really like the yaml enhancements like being able to declare execute and/or knitr parameters rather than having a set-up chunk, although it's nice set-up chunks still work). Anyway, I digress, I am happy to wait for these extra features - I mean, rmarkdown has a lot of these ancillary features/packages so you must have a very big to-do list!

jjallaire commented 2 years ago

We talked about this today and I think we'll introduce a fig-themed option and then call thematic_on() under the hood with the correct colors. We need to do this after we've processed the theme SCSS, and this currently takes place after knitr renders rather than before (shouldn't be too difficult for us to remedy this though)

mcanouil commented 1 year ago

Related to: