You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That vertical line doesn't play well with other themes.
theme_set(theme_grey())
mcmc_intervals(x)
That line color is hard-coded... Specifically in this code.
# faint vertical line at zero if zero is within x_limlayer_vertical_line<-if (0>x_lim[1] &&0<x_lim[2]) {
vline_0(color="gray90", size=0.5)
} else {
geom_ignore()
}
But in principle, we could just borrow theme's current gridline color and fatten it.
layer_vertical_line<-if (0>x_lim[1] &&0<x_lim[2]) {
# this would change to `theme_bayesplot_get()` if go that route in # issue 117t<- theme_get()
# `x %||% y` returns y when x is NULL and x otherwisecolor<-t$panel.grid.major$colour %||% "grey92"minor_size<-t$panel.grid.minor$size %||% .125major_size<-t$panel.grid.major$size %||% (minor_size*2)
size<-major_size*2
vline_0(color=color, size=size)
} else {
geom_ignore()
}
When there are no gridlines, it would default to .5.
theme_set(theme_default())
mcmc_intervals(x)
Otherwise it goes twice the width of the major gridlines.
Let's wait and see what happens here tidyverse/ggplot2#2749 where the ggplot2 authors are sorting out how to make default aesthetics customizable with a plotting theme.
Thanks for the link. If they add that functionality to ggplot2 we should definitely have it play nicely with bayesplot, which would also take care of this early issue I had forgotten about,#45, regarding setting more plotting defaults.
I was thinking today about how
mcmc_intervals()
draws a vertical line if the x's contain 0.That vertical line doesn't play well with other themes.
theme_set(theme_grey()) mcmc_intervals(x)
That line color is hard-coded... Specifically in this code.
But in principle, we could just borrow theme's current gridline color and fatten it.
When there are no gridlines, it would default to .5.
theme_set(theme_default()) mcmc_intervals(x)
Otherwise it goes twice the width of the major gridlines.
theme_set(theme_grey()) mcmc_intervals(x)
And generalize to any other gridlined theme.
The text was updated successfully, but these errors were encountered: