Skip to content

Commit 6a4c0d4

Browse files
committed
Update news
1 parent 0799463 commit 6a4c0d4

File tree

1 file changed

+100
-71
lines changed

1 file changed

+100
-71
lines changed

NEWS.md

Lines changed: 100 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,37 @@
11
# ggplot2 (development version)
22

3-
* Fix a bug in `geom_raster()` that squeezed the image when it went outside
4-
scale limits (#3539, @thomasp85)
3+
This is a minor release but does contain a range of substantial new features,
4+
along with the standard bug fixes. The release contains a few visual breaking
5+
changes, along with breaking changes for extension developers due to a shift in
6+
internal representation of the position scales and their axes. No user breaking
7+
changes are included.
8+
9+
This release also adds Dewey Dunnington (@paleolimbot) to the core team.
10+
11+
## Breaking changes
12+
There are no user-facing breaking changes, but a change in some internal
13+
representations that extension developers may have relied on, along with a few
14+
breaking visual changes which may cause visual tests in downstream packages to
15+
fail.
16+
17+
* The `panel_params` field in the `Layout` now contains a list of list of
18+
`ViewScale` objects, describing the trained coordinate system scales, instead
19+
of the list object used before. Any extensions that use this field will likely
20+
break, as will unit tests that checks aspects of this.
21+
22+
* `element_text()` now issues a warning when vectorized arguments are provided,
23+
as in `colour = c("red", "green", "blue")`. Such use is discouraged and not
24+
officially supported (@clauswilke, #3492).
25+
26+
* Changed `theme_grey()` setting for legend key so that it creates no border
27+
(`NA`) rather than drawing a white one. (@annennenne, #3180)
28+
29+
* `geom_ribbon()` now draws separate lines for the upper and lower intervals if
30+
`colour` is mapped by default. Similarly, `geom_area()` now draws lines for
31+
the upper in the same case by default. If you want old-style full stroking,
32+
use `outlier.type = "legacy"` (#3503, @yutannihilation).
33+
34+
## New features
535

636
* The evaluation time of aesthetics can now be controlled to a finer degree.
737
`after_stat()` supersedes the use of `stat()` and `..var..`-notation, and is
@@ -10,75 +40,51 @@
1040
map a data variable to a stat aesthetic, and remap the same aesthetic to
1141
something else after statistical transformation (@thomasp85, #3534)
1242

13-
* ggplot2 no longer depends on reshape2, which means that it no longer
14-
(recursively) needs plyr, stringr, or stringi packages.
43+
* All `coord_*()` functions with `xlim` and `ylim` arguments now accept
44+
vectors with `NA` as a placeholder for the minimum or maximum value
45+
(e.g., `ylim = c(0, NA)` would zoom the y-axis from 0 to the
46+
maximum value observed in the data). This mimics the behaviour
47+
of the `limits` argument in continuous scale functions
48+
(@paleolimbot, #2907).
1549

16-
* `geom_sf()` now determines the legend type automatically (@microly, #3646).
50+
* Allowed reversing of discrete scales by re-writing `get_limits()`
51+
(@AnneLyng, #3115)
1752

18-
* `scale_x_continuous()` and `scale_y_continuous()` gains an `n.breaks` argument
19-
guiding the number of automatic generated breaks (@thomasp85, #3102)
53+
* Position guides can now be customized using the new `guide_axis()`, which can
54+
be passed to position `scale_*()` functions or via `guides()`. The new axis
55+
guide (`guide_axis()`) comes with arguments `check.overlap` (automatic removal
56+
of overlapping labels), `angle` (easy rotation of axis labels), and
57+
`n.dodge` (dodge labels into multiple rows/columns) (@paleolimbot, #3322).
2058

21-
* `geom_sf()` now removes rows that can't be plotted due to `NA` aesthetics
22-
(#3546, @thomasp85)
23-
2459
* A new scale type has been added, that allows binning of aesthetics at the
2560
scale level. It has versions for both position and non-position aesthetics and
26-
comes with two new guides (`guide_bins` and `guide_coloursteps`) (@thomasp85, #3096)
61+
comes with two new guides (`guide_bins` and `guide_coloursteps`)
62+
(@thomasp85, #3096)
2763

28-
* Position guides can now be customized using the new `guide_axis()`,
29-
which can be passed to position `scale_*()` functions or via
30-
`guides()`. The new axis guide (`guide_axis()`) comes with
31-
arguments `check.overlap` (automatic removal of overlapping
32-
labels), `angle` (easy rotation of axis labels), and
33-
`n.dodge` (dodge labels into multiple rows/columns) (@paleolimbot, #3322).
34-
35-
* `Geom` now gains a `setup_params()` method in line with the other ggproto
36-
classes (@thomasp85, #3509)
37-
38-
* The newly added function `register_theme_elements()` now allows developers
39-
of extension packages to define their own new theme elements and place them
40-
into the ggplot2 element tree (@clauswilke, #2540).
41-
42-
* `element_text()` now issues a warning when vectorized arguments are provided, as in
43-
`colour = c("red", "green", "blue")`. Such use is discouraged and not officially supported
44-
(@clauswilke, #3492).
45-
46-
* Addition of partial themes to plots has been made more predictable;
47-
stepwise addition of individual partial themes is now equivalent to
48-
addition of multple theme elements at once (@clauswilke, #3039).
49-
50-
* stacking text when calculating the labels and the y axis with
51-
`stat_summary()` now works (@ikosmidis, #2709)
52-
53-
* Allowed reversing of discrete scales by re-writing `get_limits()` (@AnneLyng, #3115)
64+
* `scale_x_continuous()` and `scale_y_continuous()` gains an `n.breaks` argument
65+
guiding the number of automatic generated breaks (@thomasp85, #3102)
5466

5567
* Added `stat_contour_filled()` and `geom_contour_filled()`, which compute
56-
and draw filled contours of gridded data (@paleolimbot, #3044).
57-
58-
* `geom_contour()` and `stat_contour()` now use the isoband package
68+
and draw filled contours of gridded data (@paleolimbot, #3044).
69+
`geom_contour()` and `stat_contour()` now use the isoband package
5970
to compute contour lines. The `complete` parameter (which was undocumented
6071
and has been unused for at least four years) was removed (@paleolimbot, #3044).
61-
62-
* `stat_smooth()` uses `REML` by default, if `method = "gam"` and
63-
`gam`'s method is not specified (@ikosmidis, #2630).
64-
65-
* Changed `theme_grey()` setting for legend key so that it creates no
66-
border (`NA`) rather than drawing a white one. (@annennenne, #3180)
6772

6873
* Themes have gained two new parameters, `plot.title.position` and
6974
`plot.caption.position`, that can be used to customize how plot
7075
title/subtitle and plot caption are positioned relative to the overall plot
7176
(@clauswilke, #3252).
7277

73-
* Added function `ggplot_add.by()` for lists created with `by()` (#2734, @Maschette)
74-
75-
* `gg_dep()` was deprecated (@perezp44, #3382).
78+
## Extensions
79+
80+
* `Geom` now gains a `setup_params()` method in line with the other ggproto
81+
classes (@thomasp85, #3509)
7682

77-
* Added weight aesthetic option to `stat_density()` and made scaling of
78-
weights the default (@annennenne, #2902)
83+
* The newly added function `register_theme_elements()` now allows developers
84+
of extension packages to define their own new theme elements and place them
85+
into the ggplot2 element tree (@clauswilke, #2540).
7986

80-
* `expand_scale()` was deprecated in favour of `expansion()` for setting
81-
the `expand` argument of `x` and `y` scales (@paleolimbot).
87+
## Minor improvements and bug fixes
8288

8389
* `coord_trans()` now draws second axes and accepts `xlim`, `ylim`,
8490
and `expand` arguments to bring it up to feature parity with
@@ -93,43 +99,66 @@
9399
in `coord_trans()` was also updated such that it behaves identically
94100
to that in `coord_cartesian()` (@paleolimbot, #3338).
95101

96-
* All `coord_*()` functions with `xlim` and `ylim` arguments now accept
97-
vectors with `NA` as a placeholder for the minimum or maximum value
98-
(e.g., `ylim = c(0, NA)` would zoom the y-axis from 0 to the
99-
maximum value observed in the data). This mimics the behaviour
100-
of the `limits` argument in continuous scale functions
101-
(@paleolimbot, #2907).
102+
* `expand_scale()` was deprecated in favour of `expansion()` for setting
103+
the `expand` argument of `x` and `y` scales (@paleolimbot).
102104

103105
* `geom_abline()`, `geom_hline()`, and `geom_vline()` now issue
104106
more informative warnings when supplied with set aesthetics
105107
(i.e., `slope`, `intercept`, `yintercept`, and/or `xintercept`)
106108
and mapped aesthetics (i.e., `data` and/or `mapping`).
109+
110+
* Fix a bug in `geom_raster()` that squeezed the image when it went outside
111+
scale limits (#3539, @thomasp85)
112+
113+
* `geom_sf()` now determines the legend type automatically (@microly, #3646).
107114

108-
* `stat_density2d()` can now take an `adjust` parameter to scale the default bandwidth. (#2860, @haleyjeppson)
115+
* `geom_sf()` now removes rows that can't be plotted due to `NA` aesthetics
116+
(#3546, @thomasp85)
117+
118+
* `geom_sf()` now applies alpha to linestring geometries
119+
(#3589, @yutannihilation).
109120

110-
* Fix a bug when `show.legend` is a named logical vector (#3461, @yutannihilation).
121+
* `gg_dep()` was deprecated (@perezp44, #3382).
122+
123+
* Added function `ggplot_add.by()` for lists created with `by()`, allowing such
124+
lists to be added to ggplot objects (#2734, @Maschette)
111125

112-
* Increase the default `nbin` of `guide_colourbar()` to place the ticks more precisely (#3508, @yutannihilation).
126+
* ggplot2 no longer depends on reshape2, which means that it no longer
127+
(recursively) needs plyr, stringr, or stringi packages.
113128

114-
* `geom_sf()` now applies alpha to linestring geometries (#3589, @yutannihilation).
129+
* Increase the default `nbin` of `guide_colourbar()` to place the ticks more
130+
precisely (#3508, @yutannihilation).
115131

116132
* `manual_scale()` now matches `values` with the order of `breaks` whenever
117133
`values` is an unnamed vector. Previously, unnamed `values` would match with
118134
the limits of the scale and ignore the order of any `breaks` provided. Note
119135
that this may change the appearance of plots that previously relied on the
120136
unordered behaviour (#2429, @idno0001).
121-
122-
* `stat_summary()` and related functions now support rlang-style lambda functions
123-
(#3568, @dkahle).
124-
125-
* `geom_ribbon()` now draws separate lines for the upper and lower intervals if
126-
`colour` is mapped by default. Similarly, `geom_area()` now draws lines for
127-
the upper in the same case by default. If you want old-style full stroking, use
128-
`outlier.type = "legacy"` (#3503, @yutannihilation).
129137

130138
* `scale_manual_*(limits = ...)` now actually limits the scale (#3262,
131139
@yutannihilation).
132140

141+
* Fix a bug when `show.legend` is a named logical vector
142+
(#3461, @yutannihilation).
143+
144+
* Added weight aesthetic option to `stat_density()` and made scaling of
145+
weights the default (@annennenne, #2902)
146+
147+
* `stat_density2d()` can now take an `adjust` parameter to scale the default
148+
bandwidth. (#2860, @haleyjeppson)
149+
150+
* `stat_smooth()` uses `REML` by default, if `method = "gam"` and
151+
`gam`'s method is not specified (@ikosmidis, #2630).
152+
153+
* stacking text when calculating the labels and the y axis with
154+
`stat_summary()` now works (@ikosmidis, #2709)
155+
156+
* `stat_summary()` and related functions now support rlang-style lambda functions
157+
(#3568, @dkahle).
158+
159+
* Addition of partial themes to plots has been made more predictable;
160+
stepwise addition of individual partial themes is now equivalent to
161+
addition of multple theme elements at once (@clauswilke, #3039).
133162

134163
# ggplot2 3.2.1
135164

0 commit comments

Comments
 (0)