bayesplot
bayesplot copied to clipboard
Make mcmc_pairs() return a ggplot object instead of a bayesplot_group object (Fix #268)
This PR makes mcmc_pairs() return a ggplot object instead of a bayesplot_group object (Fix #268).
This is a DRAFT PR for review and comment!!! The reason that it is a draft is that it emits all sorts of warnings that would need to be fixed before merging, but I know that there are strong preferences about the graphical organization of the output of mcmc_pairs(), and I wanted to provide this draft to allow for testing and review. For a final PR, I would ensure that warnings were not present (or that they were minimized as much as possible).
I believe that I captured all the major functionality from the existing mcmc_pairs() output, but there were some interactions around how divergent transitions, max tree depth hits, and hex plots that may be off.
Some differences that I think are notable are:
- x-axes and y-axes are aligned now (because they are facets)
- row and column titles are now in strip labels instead of subtitles of the diagonal elements (again because they are facets)
- the vertical scale for the density or histogram plots along the diagonal are the full height of the facet rather than sharing the height with the subtitle
Hey @billdenney thank you for this and sorry for the slow reply! I'm caught up in a bunch of other stuff at the moment but hopefully I'll have time to give you some comments soon.