Skip to content

Commit f5ac182

Browse files
authored
Merge pull request #159 from malcolmbarrett/master
Save ggplot2 theme as bayesplot default if different from cache
2 parents 91a3f90 + 447f0c2 commit f5ac182

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Loading **bayesplot** no longer overrides the ggplot theme! There are new
66
functions for controlling the ggplot theme for **bayesplot** that work like
77
their **ggplot2** counterparts but only affect plots made using **bayesplot**.
8-
Thanks to Malcolm Barret. (#117, #149)
8+
Thanks to Malcolm Barrett. (#117, #149)
99
- `bayesplot_theme_set()`
1010
- `bayesplot_theme_get()`
1111
- `bayesplot_theme_update()`

R/bayesplot-ggplot-themes.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ theme_default <-
133133
#'
134134
bayesplot_theme_get <- function() {
135135
if (!identical(.bayesplot_theme_env$gg_current, ggplot2::theme_get())) {
136+
.bayesplot_theme_env$current <- ggplot2::theme_get()
136137
.bayesplot_theme_env$gg_current <- ggplot2::theme_get()
137138
thm <- .bayesplot_theme_env$gg_current
138139
} else {

0 commit comments

Comments
 (0)