stan-dev / stan-dev/bayesplot

Feature Request: Make bayesplot_grid objects a ggplot object

Open
#268 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
442
Forks
93
Avg merge
3h 11m
Merged PRs (30d)
1

Description

Related to #128 and to several other questions (such as https://discourse.mc-stan.org/t/manipulating-bayesplot-plots/4419).

It would be handy if bayesplot_grid objects could be modified like any other ggplot object. I understand that it is not currently a ggplot object is "It wasn't possible (at least it didn't seem possible when we tried) to get the plot how we wanted it to look without creating separate plots and combining them in a grid like that." (according to @jgabry in https://github.com/stan-dev/bayesplot/issues/128#issuecomment-345466831).

But, as I am running into issues much like those in #128 where I want to modify the figure after it is created, it would be helpful to use normal ggplot mechanics to do so.

I'm trying to work around this by using cowplot::plot_grid() or similar functions on the return_value$bayesplot list of plots.

Is there interest in converting a bayesplot_grid object into something that can be used with normal ggplot2? (If so, I can try to generalize what I'm working on into a PR. If not, I won't.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the bayesplot_grid object and the return_value$bayesplot list of plots, then compare the requested behavior with cowplot::plot_grid() and the discussion in issues #128 and #268. Done would require an agreed design that lets bayesplot_grid objects use normal ggplot2 modification mechanics without losing the intended grid layout.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.