Skip to content

Commit cec5603

Browse files
thomasp85teunbrand
andauthored
Release ggplot2 4.0.1 (#6746)
* polish news * reorder a few bullets in news * prep for release * don't bother subsetting labels (#6745) * Increment version number to 4.0.1 * Increment version number to 4.0.1.9000 --------- Co-authored-by: Teun van den Brand <[email protected]> Co-authored-by: Teun van den Brand <[email protected]>
1 parent 7a746b2 commit cec5603

File tree

7 files changed

+39
-27
lines changed

7 files changed

+39
-27
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: ggplot2
22
Title: Create Elegant Data Visualisations Using the Grammar of Graphics
3-
Version: 4.0.0.9000
3+
Version: 4.0.1.9000
44
Authors@R: c(
55
person("Hadley", "Wickham", , "[email protected]", role = "aut",
66
comment = c(ORCID = "0000-0003-4757-117X")),

NEWS.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
# ggplot2 (development version)
22

3+
# ggplot2 4.0.1
4+
5+
This is a smaller patch release focussed on fixing regressions from 4.0.0 and
6+
polishing the recent features.
7+
8+
## Bug fixes
9+
310
* Fixed regression where `geom_area()` didn't draw panels with single groups
411
when `stat = "align"` (@teunbrand, #6680)
512
* Fixed regression where `position_stack(vjust)` was ignored when there are
613
only single groups (#6692)
714
* Fixed bug where `NA` handling in `geom_path()` was ignoring panels (@teunbrand, #6533)
8-
* Logical values for the linetype aesthetic will be interpreted numerically,
9-
so that `linetype = FALSE` becomes 0/'blank' and `linetype = TRUE` becomes
10-
1/'solid' (@teunbrand, #6641)
11-
* Out-of-bounds datapoints used as padding by `stat_align()` now get removed
12-
silently rather than verbosely (@teunbrand, #6667)
1315
* Fixed bug where `stat_bin(boundary)` was ignored (#6682).
1416
* `geom_text()` and `geom_label()` accept expressions as the `label` aesthetic
1517
(@teunbrand, #6638)
1618
* Fixed regression where `draw_key_rect()` stopped using `fill` colours
1719
(@mitchelloharawild, #6609).
1820
* Fixed regression where `scale_{x,y}_*()` threw an error when an expression
1921
object is set to `labels` argument (@yutannihilation, #6617).
20-
* Improved palette fallback mechanism in scales (@teunbrand, #6669).
21-
* Allow `stat` in `geom_hline`, `geom_vline`, and `geom_abline`. (@sierrajohnson, #6559)
22-
* `stat_boxplot()` treats `width` as an optional aesthetic (@Yunuuuu, #6575)
2322
* Fixed regression where the first (unnamed) argument to colour/fill scales was
2423
not passed as the `name` argument (@teunbrand, #6623)
2524
* Fixed issue where vectorised `arrow()`s caused errors in drawing the
@@ -28,10 +27,21 @@
2827
insistently. Now they contribute only as fallback labels (@teunbrand, #6616)
2928
* Fixed regression where empty arguments to colour/fill scale caused errors
3029
(@jmbarbone, #6710)
30+
* Fixed axis misplacement in `coor_radial()` when labels are blank (@teunbrand, #6574)
31+
32+
## Improvements
33+
34+
* Improved palette fallback mechanism in scales (@teunbrand, #6669).
35+
* Allow `stat` in `geom_hline`, `geom_vline`, and `geom_abline`. (@sierrajohnson, #6559)
36+
* `stat_boxplot()` treats `width` as an optional aesthetic (@Yunuuuu, #6575)
3137
* The `theme(panel.widths, panel.heights)` setting attempts to preserve the
3238
plot's aspect ratio when only one of the two settings is given, and the plot
3339
has a single panel (@teunbrand, #6701).
34-
* Fixed axis misplacement in `coor_radial()` when labels are blank (@teunbrand, #6574)
40+
* Logical values for the linetype aesthetic will be interpreted numerically,
41+
so that `linetype = FALSE` becomes 0/'blank' and `linetype = TRUE` becomes
42+
1/'solid' (@teunbrand, #6641)
43+
* Out-of-bounds datapoints used as padding by `stat_align()` now get removed
44+
silently rather than verbosely (@teunbrand, #6667)
3545

3646
# ggplot2 4.0.0
3747

R/layer.R

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -972,10 +972,8 @@ normalise_label <- function(label) {
972972
return(NULL)
973973
}
974974
if (obj_is_list(label)) {
975-
# Ensure that each element in the list has length 1
975+
# Ensure no elements are empty
976976
label[lengths(label) == 0] <- ""
977-
truncate <- !vapply(label, is.call, logical(1)) # Don't mess with call/formula
978-
label[truncate] <- lapply(label[truncate], `[`, 1)
979977
}
980978
if (is.expression(label)) {
981979
# Classed expressions, when converted to lists, retain their class.

README.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ If you are new to ggplot2 you are better off starting with a systematic introduc
7676
[Communication][r4ds-comm] chapters in
7777
[R for Data Science][r4ds]. R for Data Science is designed to
7878
give you a comprehensive introduction to the
79-
[tidyverse](https://www.tidyverse.org), and these two chapters will
79+
[tidyverse](https://tidyverse.org/), and these two chapters will
8080
get you up to speed with the essentials of ggplot2 as quickly as
8181
possible.
8282

@@ -119,4 +119,4 @@ There are two main places to get help with ggplot2:
119119
[r4ds-vis]: https://r4ds.hadley.nz/data-visualize
120120
[r4ds-comm]: https://r4ds.hadley.nz/communication
121121
[oreilly]: https://learning.oreilly.com/videos/data-visualization-in/9781491963661/
122-
[blog]: https://www.tidyverse.org/tags/ggplot2/
122+
[blog]: https://tidyverse.org/tags/ggplot2/

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ documentation pages. Currently, there are several good places to start:
8080
[Communication](https://r4ds.hadley.nz/communication) chapters in [R
8181
for Data Science](https://r4ds.hadley.nz). R for Data Science is
8282
designed to give you a comprehensive introduction to the
83-
[tidyverse](https://www.tidyverse.org), and these two chapters will
84-
get you up to speed with the essentials of ggplot2 as quickly as
83+
[tidyverse](https://tidyverse.org/), and these two chapters will get
84+
you up to speed with the essentials of ggplot2 as quickly as
8585
possible.
8686

8787
2. If you’d like to take an online course, try [Data Visualization in R
@@ -105,7 +105,7 @@ documentation pages. Currently, there are several good places to start:
105105
graphics specifically tailored to your needs.
106106

107107
6. For articles about announcements and deep-dives you can visit the
108-
[tidyverse blog](https://www.tidyverse.org/tags/ggplot2/).
108+
[tidyverse blog](https://tidyverse.org/tags/ggplot2/).
109109

110110
## Getting help
111111

cran-comments.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
This is a major release of ggplot2. Among other things it includes an adaption
2-
of S7 for all the S3 classes and methods that were currently in use.
3-
Unfortunately such a change is not without issue with the number of reverse
4-
dependencies that ggplot2 has as many packages wrongfully checks the internals
5-
of ggplot2 objects in their tests.
1+
This is a patch release fixing a range of regressions reported after the 4.0.0
2+
release. While no breaking changes in the API we did detect a few packages that
3+
breaks with this release due to either making assumptions about ggplot2 internal
4+
behaviour, or requiring documentation updates that can only happen after release
5+
of 4.0.1
66

7-
Because of this you should expect a larger than usual number of breaking
8-
packages. We have been very diligent to reach out to all maintainers over the
9-
last 2-3 months and provided resolutions but breakages are still to be expected.
7+
The packages are:
8+
- adproplus: https://github.com/henry-heppe/adproclus/issues/3
9+
- ggsurveillance: https://github.com/biostats-dev/ggsurveillance/issues/1
10+
- ggformula: https://github.com/ProjectMOSAIC/ggformula/issues/187
11+
- ggside: https://github.com/jtlandis/ggside/issues/71
12+
13+
They have all been notified in advance of this submission

vignettes/ggplot2-in-packages.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,4 +246,4 @@ Generally, if you add a method for a ggplot2 generic like `autoplot()`, ggplot2
246246
```
247247

248248
## Read more
249-
There are other things to consider when taking on a dependency. [This post]( https://www.tidyverse.org/blog/2022/09/playing-on-the-same-team-as-your-dependecy/) goes into detail with many of these using ggplot2 as an example and is a good read for anyone developing a package using ggplot2.
249+
There are other things to consider when taking on a dependency. [This post]( https://tidyverse.org/blog/2022/09/playing-on-the-same-team-as-your-dependecy/) goes into detail with many of these using ggplot2 as an example and is a good read for anyone developing a package using ggplot2.

0 commit comments

Comments
 (0)