Remove unnecessary y-axis from MCMC density and histogram plots#420
Remove unnecessary y-axis from MCMC density and histogram plots#420LokeshShukla910 wants to merge 1 commit intostan-dev:masterfrom
Conversation
LokeshShukla910
commented
Feb 7, 2026
- Removed the y-axis text, title, and ticks from mcmc_dens(), mcmc_dens_overlay(), and mcmc_hist() plots, as the y-axis does not provide useful information for these visualizations.
- Updated the internal .mcmc_hist() and .mcmc_dens() functions to consistently suppress the y-axis for single and multi-parameter plots.
- This change improves plot aesthetics and consistency with mcmc_dots(), making the plots cleaner and easier to interpret.
- Removed the y-axis text, title, and ticks from mcmc_dens(), mcmc_dens_overlay(), and mcmc_hist() plots, as the y-axis does not provide useful information for these visualizations. - Updated the internal .mcmc_hist() and .mcmc_dens() functions to consistently suppress the y-axis for single and multi-parameter plots. - This change improves plot aesthetics and consistency with mcmc_dots(), making the plots cleaner and easier to interpret.
|
Hi, thank you for your interest in submitting a PR. Have you verified that the changes to the code work as intended?
These were already removed (see my review comments). What issue #418 is about is removing the axis line itself.
These changes don't suppress the y-axis. They turn off text and tick marks, but those were already disabled. |
| bayesplot_theme_get() + | ||
| yaxis_text(FALSE) + | ||
| yaxis_ticks(FALSE) + | ||
| yaxis_title(on = n_param == 1 && violin) + |
There was a problem hiding this comment.
We need to keep this for the special case of 1 parameter and a violin plot. If you look at a 1 parameter violin plot you'll see why (the y-axis provides the parameter name)
| yaxis_text(FALSE) + | ||
| yaxis_title(FALSE) + | ||
| yaxis_ticks(FALSE) |
There was a problem hiding this comment.
These are already included in the internal .mcmc_dens() function so we don't need to add them again here. These don't turn off the y-axis, they just turn off the text and tick marks, but those were already off.
| ) + | ||
| yaxis_text(FALSE) + | ||
| yaxis_title(FALSE) + | ||
| yaxis_ticks(FALSE) |
There was a problem hiding this comment.
These are already included in the internal .mcmc_dens() function so we don't need to add them again here. These don't turn off the y-axis, they just turn off the text and tick marks, but those were already off.