Skip to content
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

Add support for ggplot2 3.4.0 #28

Merged
merged 2 commits into from
Nov 15, 2022
Merged

Add support for ggplot2 3.4.0 #28

merged 2 commits into from
Nov 15, 2022

Conversation

barrettk
Copy link
Collaborator

Add support for ggplot2 3.4.0 and subsequent versions, while still supporting earlier versions.

Taken from their latest release:

A linewidth aesthetic has been introduced and supersedes the size
aesthetic for scaling the width of lines in line based geoms. size will
remain functioning but deprecated for these geoms and it is recommended to
update all code to reflect the new aesthetic. For geoms that have both point
sizing and linewidth sizing (geom_pointrange() and geom_sf) size now
only refers to sizing of points which can leads to a visual change in old
code (@thomasp85, tidyverse/ggplot2#3672)

In other words, we need to ensure that both size and linewidth attributes are supported for line related _geoms. geom_linerange() was the only affected function pmforest relies on.

closes #26

 - size attribute was changed to linewidth for line related `_geoms`. Use size when ggplot2 version is less than 3.4.0, and linewidth when its greater than or equal to said version.
@barrettk barrettk requested a review from kyleam November 15, 2022 16:10
@barrettk barrettk merged commit 362e3a0 into main Nov 15, 2022
@barrettk barrettk deleted the patch/ggplot_fix branch November 17, 2022 17:36
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.

Deal with deprecation warnings
2 participants