|
1 | 1 | # ggplot2 (development version) |
2 | 2 |
|
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 |
5 | 35 |
|
6 | 36 | * The evaluation time of aesthetics can now be controlled to a finer degree. |
7 | 37 | `after_stat()` supersedes the use of `stat()` and `..var..`-notation, and is |
|
10 | 40 | map a data variable to a stat aesthetic, and remap the same aesthetic to |
11 | 41 | something else after statistical transformation (@thomasp85, #3534) |
12 | 42 |
|
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). |
15 | 49 |
|
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) |
17 | 52 |
|
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). |
20 | 58 |
|
21 | | -* `geom_sf()` now removes rows that can't be plotted due to `NA` aesthetics |
22 | | - (#3546, @thomasp85) |
23 | | - |
24 | 59 | * A new scale type has been added, that allows binning of aesthetics at the |
25 | 60 | 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) |
27 | 63 |
|
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) |
54 | 66 |
|
55 | 67 | * 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 |
59 | 70 | to compute contour lines. The `complete` parameter (which was undocumented |
60 | 71 | 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) |
67 | 72 |
|
68 | 73 | * Themes have gained two new parameters, `plot.title.position` and |
69 | 74 | `plot.caption.position`, that can be used to customize how plot |
70 | 75 | title/subtitle and plot caption are positioned relative to the overall plot |
71 | 76 | (@clauswilke, #3252). |
72 | 77 |
|
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) |
76 | 82 |
|
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). |
79 | 86 |
|
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 |
82 | 88 |
|
83 | 89 | * `coord_trans()` now draws second axes and accepts `xlim`, `ylim`, |
84 | 90 | and `expand` arguments to bring it up to feature parity with |
|
93 | 99 | in `coord_trans()` was also updated such that it behaves identically |
94 | 100 | to that in `coord_cartesian()` (@paleolimbot, #3338). |
95 | 101 |
|
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). |
102 | 104 |
|
103 | 105 | * `geom_abline()`, `geom_hline()`, and `geom_vline()` now issue |
104 | 106 | more informative warnings when supplied with set aesthetics |
105 | 107 | (i.e., `slope`, `intercept`, `yintercept`, and/or `xintercept`) |
106 | 108 | 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). |
107 | 114 |
|
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). |
109 | 120 |
|
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) |
111 | 125 |
|
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. |
113 | 128 |
|
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). |
115 | 131 |
|
116 | 132 | * `manual_scale()` now matches `values` with the order of `breaks` whenever |
117 | 133 | `values` is an unnamed vector. Previously, unnamed `values` would match with |
118 | 134 | the limits of the scale and ignore the order of any `breaks` provided. Note |
119 | 135 | that this may change the appearance of plots that previously relied on the |
120 | 136 | 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). |
129 | 137 |
|
130 | 138 | * `scale_manual_*(limits = ...)` now actually limits the scale (#3262, |
131 | 139 | @yutannihilation). |
132 | 140 |
|
| 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). |
133 | 162 |
|
134 | 163 | # ggplot2 3.2.1 |
135 | 164 |
|
|
0 commit comments