Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ggplot2
Title: Create Elegant Data Visualisations Using the Grammar of Graphics
Version: 4.0.0.9000
Version: 4.0.1.9000
Authors@R: c(
person("Hadley", "Wickham", , "hadley@posit.co", role = "aut",
comment = c(ORCID = "0000-0003-4757-117X")),
Expand Down
28 changes: 19 additions & 9 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
# ggplot2 (development version)

# ggplot2 4.0.1

This is a smaller patch release focussed on fixing regressions from 4.0.0 and
polishing the recent features.

## Bug fixes

* Fixed regression where `geom_area()` didn't draw panels with single groups
when `stat = "align"` (@teunbrand, #6680)
* Fixed regression where `position_stack(vjust)` was ignored when there are
only single groups (#6692)
* Fixed bug where `NA` handling in `geom_path()` was ignoring panels (@teunbrand, #6533)
* Logical values for the linetype aesthetic will be interpreted numerically,
so that `linetype = FALSE` becomes 0/'blank' and `linetype = TRUE` becomes
1/'solid' (@teunbrand, #6641)
* Out-of-bounds datapoints used as padding by `stat_align()` now get removed
silently rather than verbosely (@teunbrand, #6667)
* Fixed bug where `stat_bin(boundary)` was ignored (#6682).
* `geom_text()` and `geom_label()` accept expressions as the `label` aesthetic
(@teunbrand, #6638)
* Fixed regression where `draw_key_rect()` stopped using `fill` colours
(@mitchelloharawild, #6609).
* Fixed regression where `scale_{x,y}_*()` threw an error when an expression
object is set to `labels` argument (@yutannihilation, #6617).
* Improved palette fallback mechanism in scales (@teunbrand, #6669).
* Allow `stat` in `geom_hline`, `geom_vline`, and `geom_abline`. (@sierrajohnson, #6559)
* `stat_boxplot()` treats `width` as an optional aesthetic (@Yunuuuu, #6575)
* Fixed regression where the first (unnamed) argument to colour/fill scales was
not passed as the `name` argument (@teunbrand, #6623)
* Fixed issue where vectorised `arrow()`s caused errors in drawing the
Expand All @@ -28,10 +27,21 @@
insistently. Now they contribute only as fallback labels (@teunbrand, #6616)
* Fixed regression where empty arguments to colour/fill scale caused errors
(@jmbarbone, #6710)
* Fixed axis misplacement in `coor_radial()` when labels are blank (@teunbrand, #6574)

## Improvements

* Improved palette fallback mechanism in scales (@teunbrand, #6669).
* Allow `stat` in `geom_hline`, `geom_vline`, and `geom_abline`. (@sierrajohnson, #6559)
* `stat_boxplot()` treats `width` as an optional aesthetic (@Yunuuuu, #6575)
* The `theme(panel.widths, panel.heights)` setting attempts to preserve the
plot's aspect ratio when only one of the two settings is given, and the plot
has a single panel (@teunbrand, #6701).
* Fixed axis misplacement in `coor_radial()` when labels are blank (@teunbrand, #6574)
* Logical values for the linetype aesthetic will be interpreted numerically,
so that `linetype = FALSE` becomes 0/'blank' and `linetype = TRUE` becomes
1/'solid' (@teunbrand, #6641)
* Out-of-bounds datapoints used as padding by `stat_align()` now get removed
silently rather than verbosely (@teunbrand, #6667)

# ggplot2 4.0.0

Expand Down
4 changes: 1 addition & 3 deletions R/layer.R
Original file line number Diff line number Diff line change
Expand Up @@ -972,10 +972,8 @@ normalise_label <- function(label) {
return(NULL)
}
if (obj_is_list(label)) {
# Ensure that each element in the list has length 1
# Ensure no elements are empty
label[lengths(label) == 0] <- ""
truncate <- !vapply(label, is.call, logical(1)) # Don't mess with call/formula
label[truncate] <- lapply(label[truncate], `[`, 1)
}
if (is.expression(label)) {
# Classed expressions, when converted to lists, retain their class.
Expand Down
4 changes: 2 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ If you are new to ggplot2 you are better off starting with a systematic introduc
[Communication][r4ds-comm] chapters in
[R for Data Science][r4ds]. R for Data Science is designed to
give you a comprehensive introduction to the
[tidyverse](https://www.tidyverse.org), and these two chapters will
[tidyverse](https://tidyverse.org/), and these two chapters will
get you up to speed with the essentials of ggplot2 as quickly as
possible.

Expand Down Expand Up @@ -119,4 +119,4 @@ There are two main places to get help with ggplot2:
[r4ds-vis]: https://r4ds.hadley.nz/data-visualize
[r4ds-comm]: https://r4ds.hadley.nz/communication
[oreilly]: https://learning.oreilly.com/videos/data-visualization-in/9781491963661/
[blog]: https://www.tidyverse.org/tags/ggplot2/
[blog]: https://tidyverse.org/tags/ggplot2/
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ documentation pages. Currently, there are several good places to start:
[Communication](https://r4ds.hadley.nz/communication) chapters in [R
for Data Science](https://r4ds.hadley.nz). R for Data Science is
designed to give you a comprehensive introduction to the
[tidyverse](https://www.tidyverse.org), and these two chapters will
get you up to speed with the essentials of ggplot2 as quickly as
[tidyverse](https://tidyverse.org/), and these two chapters will get
you up to speed with the essentials of ggplot2 as quickly as
possible.

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

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

## Getting help

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

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

They have all been notified in advance of this submission
2 changes: 1 addition & 1 deletion vignettes/ggplot2-in-packages.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -246,4 +246,4 @@ Generally, if you add a method for a ggplot2 generic like `autoplot()`, ggplot2
```

## Read more
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.
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.