Skip to content

Warn on unsupported geoms in annotate() #4721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 15, 2022
Merged

Conversation

mikmart
Copy link
Contributor

@mikmart mikmart commented Jan 27, 2022

Reference line geoms geom_abline(), geom_hline() and geom_vline() not working with annotate() has caused some recurring confusion (at least #1052, #2011, and #4719). Previous issues have been resolved with an acknowledgement, and a recommendation to use the geoms in question directly, instead.

To hopefully prevent further confusion, this PR:

  • Documents the behaviour and recommendation in annotate()
  • Adds a warning to annotate() when unsupported geoms are requested

Closes #4719.

@mikmart
Copy link
Contributor Author

mikmart commented Feb 5, 2022

Like with many other PRs at the moment, the failed check is due to a missing package on the 3.3. builder:

Error: Error in loadNamespace(name) : there is no package called ‘rcmdcheck’

@yutannihilation
Copy link
Member

We're actually dropping R 3.3 from the CI at least, so please ignore that failure.

#4697 (comment)

@hadley
Copy link
Member

hadley commented Mar 14, 2022

Can you please merge/rebase?

@mikmart
Copy link
Contributor Author

mikmart commented Mar 14, 2022

Thank you for reviewing, @hadley! I've applied your suggestions, and resolved the merge conflict.

@mikmart
Copy link
Contributor Author

mikmart commented Mar 14, 2022

Looks like other PRs getting merged keeps causing a conflict in NEWS.md here. Is there any way to avoid that (e.g. does it help if I were to place the changes at the end of the development list rather than at the top), or is it just something you have to live with?

@hadley
Copy link
Member

hadley commented Mar 15, 2022

It's just something we live with 😞

@hadley hadley merged commit 9bd2d18 into tidyverse:main Mar 15, 2022
schloerke added a commit to schloerke/ggplot2 that referenced this pull request Mar 23, 2022
* master: (320 commits)
  Orientation-aware key glyphs (tidyverse#4757)
  Fix warning in geom_violin with draw_quantiles (tidyverse#4654)
  Fix misalignment in geom_dotplot when stackratio != 1 and stackdir != "up" (tidyverse#4734)
  Replace coord_equal in scale-identity.r (tidyverse#4759)
  Unified message format in `geom_smooth()` (tidyverse#4634)
  Add parentheses to mentions of binned_scale in scale-alpha and scale-viridis documentation (tidyverse#4735)
  Update geom-boxplot.r (tidyverse#4744)
  Remove unneeded backslash from diamonds docs (tidyverse#4711)
  Re-document
  Warn on unsupported geoms in annotate() (tidyverse#4721)
  Re-document
  Add Trump to presidential terms dataset (tidyverse#4702)
  Corrects bins / binwidth override documentation (tidyverse#4720)
  Update infrastructure to new best practices (tidyverse#4748)
  remove stringsAsFactor for the mapped_discrete as.data.frame method (tidyverse#4750)
  Workflow updates (tidyverse#4747)
  Ensure output is numeric even if ifelse clause is NA (tidyverse#4692)
  Add non_missing_aes to geom_tile (tidyverse#4683)
  Pass on binwidth and height to geom (tidyverse#4671)
  Check for range == NULL - happens if no data has been added to plot (tidyverse#4682)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

annotate() with hline and vline geoms
3 participants