tidyverse / tidyverse/ggplot2

Drop plot_env from ggplot2 objects?

Open
#3,994 22 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

internals :mag_right:
Dominant language
R
Stars
7k
Forks
2.1k
Avg merge
59m
Merged PRs (30d)
2

Description

This comment https://github.com/tidyverse/ggplot2/issues/3619#issuecomment-628021555 prompted me to look into plot_env, and as far as I can see it's stored and handed around just so it can be eventually given to the function combine_vars(), which then doesn't use it:
https://github.com/tidyverse/ggplot2/blob/e9b9946786dae861dea1c352f2ac7b2a837b5f82/R/facet-.r#L544-L587
Is this a hold-over from the times before tidy eval? Can we remove this/or assign NULL here?
https://github.com/tidyverse/ggplot2/blob/5a686c34b304ddefeee16d44362f326cfa29634e/R/plot.r#L96

It is already marked as deprecated in the documentation:
https://github.com/tidyverse/ggplot2/blob/5a686c34b304ddefeee16d44362f326cfa29634e/R/plot.r#L35

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 tracing plot_env from R/plot.r through the calls into combine_vars() in R/facet-.r, using the linked code locations as the entry points. Determine whether it can be removed or assigned NULL without changing ggplot2 behavior; done means the obsolete state is no longer needed by these paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data-visualization
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.