|
1 |
| -# ggplot2 (development version) |
| 1 | +# ggplot2 3.4.0 |
| 2 | +This is a minor release focusing on tightening up the internals and ironing out |
| 3 | +some inconsistencies in the API. The biggest change is the addition of the |
| 4 | +`linewidth` aesthetic that takes of sizing the width of any line from `size`. |
| 5 | +This change, while attempting to be as non-breaking as possible, has the |
| 6 | +potential to change the look of some of your plots. |
| 7 | + |
| 8 | +Other notable changes is a complete redo of the error and warning messaging in |
| 9 | +ggplot2 using the cli package. Messaging is now better contextualised and it |
| 10 | +should be easier to identify which layer an error is coming from. Last, we have |
| 11 | +now made the switch to using the vctrs package internally which means that |
| 12 | +support for vctrs classes as variables should improve, along with some small |
| 13 | +gains in rendering speed. |
2 | 14 |
|
| 15 | +## Breaking changes |
| 16 | + |
| 17 | +* A `linewidth` aesthetic has been introduced and supersedes the `size` |
| 18 | + aesthetic for scaling the width of lines in line based geoms. `size` will |
| 19 | + remain functioning but deprecated for these geoms and it is recommended to |
| 20 | + update all code to reflect the new aesthetic. For geoms that have _both_ point |
| 21 | + sizing and linewidth sizing (`geom_pointrange()` and `geom_sf`) `size` now |
| 22 | + **only** refers to sizing of points which can leads to a visual change in old |
| 23 | + code (@thomasp85, #3672) |
| 24 | + |
| 25 | +* The default line width for polygons in `geom_sf()` have been decreased to 0.2 |
| 26 | + to reflect that this is usually used for demarking borders where a thinner |
| 27 | + line is better suited. This change was made since we already induced a |
| 28 | + visual change in `geom_sf()` with the introduction of the `linewidth` |
| 29 | + aesthetic. |
| 30 | + |
3 | 31 | * The dot-dot notation (`..var..`) and `stat()`, which have been superseded by
|
4 | 32 | `after_stat()`, are now formally deprecated (@yutannihilation, #3693).
|
5 | 33 |
|
| 34 | +* `qplot()` is now formally deprecated (@yutannihilation, #3956). |
| 35 | + |
| 36 | +* `stage()` now properly refers to the values without scale transformations for |
| 37 | + the stage of `after_stat`. If your code requires the scaled version of the |
| 38 | + values for some reason, you have to apply the same transformation by yourself, |
| 39 | + e.g. `sqrt()` for `scale_{x,y}_sqrt()` (@yutannihilation and @teunbrand, #4155). |
| 40 | + |
| 41 | +* Use `rlang::hash()` instead of `digest::digest()`. This update may lead to |
| 42 | + changes in the automatic sorting of legends. In order to enforce a specific |
| 43 | + legend order use the `order` argument in the guide. (@thomasp85, #4458) |
| 44 | + |
| 45 | +* referring to `x` in backquoted expressions with `label_bquote()` is no longer |
| 46 | + possible. |
| 47 | + |
| 48 | +* The `ticks.linewidth` and `frame.linewidth` parameters of `guide_colourbar()` |
| 49 | + are now multiplied with `.pt` like elsewhere in ggplot2. It can cause visual |
| 50 | + changes when these arguments are not the defaults and these changes can be |
| 51 | + restored to their previous behaviour by adding `/ .pt` (@teunbrand #4314). |
| 52 | + |
| 53 | +* `scale_*_viridis_b()` now uses the full range of the viridis scales |
| 54 | + (@gregleleu, #4737) |
| 55 | + |
| 56 | +## New features |
| 57 | + |
6 | 58 | * `geom_col()` and `geom_bar()` gain a new `just` argument. This is set to `0.5`
|
7 | 59 | by default; use `just = 0`/`just = 1` to place columns on the left/right
|
8 | 60 | of the axis breaks.
|
9 | 61 | (@wurli, #4899)
|
10 |
| - |
11 |
| -* Fix a bug in `position_jitter()` where infinity values were dropped (@javlon, |
12 |
| - #4790). |
13 |
| - |
14 |
| -* `geom_linerange()` now respects the `na.rm` argument (#4927, @thomasp85) |
15 |
| - |
16 |
| -* Improve the support for `guide_axis()` on `coord_trans()` (@yutannihilation, #3959) |
17 | 62 |
|
18 | 63 | * `geom_density()` and `stat_density()` now support `bounds` argument
|
19 | 64 | to estimate density with boundary correction (@echasnovski, #4013).
|
|
22 | 67 | columns were dropped and warns about this. If stats intend to drop
|
23 | 68 | data columns they can declare them in the new field `dropped_aes`.
|
24 | 69 | (@clauswilke, #3250)
|
| 70 | + |
| 71 | +* `...` supports `rlang::list2` dynamic dots in all public functions. |
| 72 | + (@mone27, #4764) |
| 73 | + |
| 74 | +* `theme()` now has a `strip.clip` argument, that can be set to `"off"` to |
| 75 | + prevent the clipping of strip text and background borders (@teunbrand, #4118) |
| 76 | + |
| 77 | +* `geom_contour()` now accepts a function in the `breaks` argument |
| 78 | + (@eliocamp, #4652). |
| 79 | + |
| 80 | +## Minor improvements and bug fixes |
| 81 | + |
| 82 | +* Fix a bug in `position_jitter()` where infinity values were dropped (@javlon, |
| 83 | + #4790). |
| 84 | + |
| 85 | +* `geom_linerange()` now respects the `na.rm` argument (#4927, @thomasp85) |
| 86 | + |
| 87 | +* Improve the support for `guide_axis()` on `coord_trans()` |
| 88 | + (@yutannihilation, #3959) |
25 | 89 |
|
26 | 90 | * Added `stat_align()` to align data without common x-coordinates prior to
|
27 | 91 | stacking. This is now the default stat for `geom_area()` (@thomasp85, #4850)
|
|
30 | 94 | certain number of digits would cause the computations to fail (@thomasp85,
|
31 | 95 | #4874)
|
32 | 96 |
|
33 |
| -* `stage()` now properly refers to the values without scale transformations for |
34 |
| - the stage of `after_stat`. If your code requires the scaled version of the |
35 |
| - values for some reason, you have to apply the same transformation by yourself, |
36 |
| - e.g. `sqrt()` for `scale_{x,y}_sqrt()` (@yutannihilation and @teunbrand, #4155). |
37 |
| - |
38 |
| -* A `linewidth` aesthetic has been introduced and supersedes the `size` |
39 |
| - aesthetic for scaling the width of lines in line based geoms. `size` will |
40 |
| - remain functioning but deprecated for these geoms and it is recommended to |
41 |
| - update all code to reflect the new aesthetic (@thomasp85, #3672) |
42 |
| - |
43 | 97 | * Secondary axis ticks are now positioned more precisely, removing small visual
|
44 | 98 | artefacts with alignment between grid and ticks (@thomasp85, #3576)
|
45 | 99 |
|
46 |
| -* Improve `stat_function` documentation regarding `xlim` argument. (@92amartins, #4474) |
47 |
| - |
48 |
| -* `qplot()` is now formally deprecated (@yutannihilation, #3956). |
49 |
| - |
50 |
| -* Use `rlang::hash()` instead of `digest::digest()`. This update may lead to |
51 |
| - changes in the automatic sorting of legends. In order to enforce a specific |
52 |
| - legend order use the `order` argument in the guide. (@thomasp85, #4458) |
| 100 | +* Improve `stat_function` documentation regarding `xlim` argument. |
| 101 | + (@92amartins, #4474) |
53 | 102 |
|
54 | 103 | * Fix various issues with how `labels`, `breaks`, `limits`, and `show.limits`
|
55 | 104 | interact in the different binning guides (@thomasp85, #4831)
|
|
62 | 111 | If used incorrectly, the warning will now report the duplicated aesthetic
|
63 | 112 | instead of `NA` (@teunbrand, #4707).
|
64 | 113 |
|
65 |
| -* `...` supports `rlang::list2` dynamic dots in all public functions. (@mone27, #4764) |
66 |
| - |
67 |
| -* `theme()` now has a `strip.clip` argument, that can be set to `"off"` to |
68 |
| - prevent the clipping of strip text and background borders (@teunbrand, #4118) |
69 |
| - |
70 | 114 | * `aes()` now supports the `!!!` operator in its first two arguments
|
71 | 115 | (#2675). Thanks to @yutannihilation and @teunbrand for draft
|
72 | 116 | implementations.
|
|
81 | 125 |
|
82 | 126 | * `presidential` dataset now includes Trump's presidency (@bkmgit, #4703).
|
83 | 127 |
|
84 |
| -* referring to `x` in backquoted expressions with `label_bquote()` is no longer |
85 |
| - possible. |
86 |
| - |
87 | 128 | * `position_stack()` now works fully with `geom_text()` (@thomasp85, #4367)
|
88 | 129 |
|
89 | 130 | * `geom_tile()` now correctly recognises missing data in `xmin`, `xmax`, `ymin`,
|
|
106 | 147 | * Binning scales are now more resilient to calculated limits that ends up being
|
107 | 148 | `NaN` after transformations (@thomasp85, #4510)
|
108 | 149 |
|
109 |
| -* Strip padding in `facet_grid()` is now only in effect if `strip.placement = "outside"` |
110 |
| - _and_ an axis is present between the strip and the panel (@thomasp85, #4610) |
| 150 | +* Strip padding in `facet_grid()` is now only in effect if |
| 151 | + `strip.placement = "outside"` _and_ an axis is present between the strip and |
| 152 | + the panel (@thomasp85, #4610) |
111 | 153 |
|
112 | 154 | * Aesthetics of length 1 are now recycled to 0 if the length of the data is 0
|
113 | 155 | (@thomasp85, #4588)
|
|
134 | 176 | all `values` on the legend instead, use
|
135 | 177 | `scale_*_manual(values = vals, limits = names(vals))`. (@teunbrand, @banfai,
|
136 | 178 | #4511, #4534)
|
137 |
| - |
138 |
| -* `geom_contour()` now accepts a function in the `breaks` argument (@eliocamp, #4652). |
139 |
| - |
140 |
| -* VISUAL CHANGE: `scale_*_viridis_b()` now uses the full range of the viridis scales (@gregleleu, #4737) |
141 | 179 |
|
142 | 180 | * Updated documentation for `geom_contour()` to correctly reflect argument
|
143 |
| -precedence between `bins` and `binwidth`. (@eliocamp, #4651) |
144 |
| - |
145 |
| -* The `ticks.linewidth` and `frame.linewidth` parameters of `guide_colourbar()` |
146 |
| - are now multiplied with `.pt` like elsewhere in ggplot2. It can cause visual |
147 |
| - changes when these arguments are not the defaults and these changes can be |
148 |
| - restored to their previous behaviour by adding `/ .pt` (@teunbrand #4314). |
| 181 | + precedence between `bins` and `binwidth`. (@eliocamp, #4651) |
149 | 182 |
|
150 | 183 | * Dots in `geom_dotplot()` are now correctly aligned to the baseline when
|
151 | 184 | `stackratio != 1` and `stackdir != "up"` (@mjskay, #4614)
|
152 | 185 |
|
153 | 186 | * Key glyphs for `geom_boxplot()`, `geom_crossbar()`, `geom_pointrange()`, and
|
154 | 187 | `geom_linerange()` are now orientation-aware (@mjskay, #4732)
|
155 | 188 |
|
156 |
| -* Updated documentation for `geom_smooth()` to more clearly describe effects of the |
157 |
| - `fullrange` parameter (@thoolihan, #4399). |
| 189 | +* Updated documentation for `geom_smooth()` to more clearly describe effects of |
| 190 | + the `fullrange` parameter (@thoolihan, #4399). |
158 | 191 |
|
159 | 192 | # ggplot2 3.3.6
|
160 | 193 | This is a very small release only applying an internal change to comply with
|
|
0 commit comments