|
1 |
| -# ggplot2 (development version) |
2 |
| - |
3 | 1 | * `annotation_raster()` adds support for native rasters. For large rasters,
|
4 | 2 | native rasters render significantly faster than arrays (@kent37, #3388)
|
5 | 3 |
|
|
8 | 6 |
|
9 | 7 | * Added an `outside` option to `annotation_logticks()` that places tick marks
|
10 | 8 | outside of the plot bounds. (#3783, @kbodwin)
|
11 |
| - |
| 9 | + |
12 | 10 | # ggplot2 3.3.0
|
13 | 11 |
|
14 |
| -* Fix a bug in `geom_raster()` that squeezed the image when it went outside |
15 |
| - scale limits (#3539, @thomasp85) |
| 12 | +This is a minor release but does contain a range of substantial new features, |
| 13 | +along with the standard bug fixes. The release contains a few visual breaking |
| 14 | +changes, along with breaking changes for extension developers due to a shift in |
| 15 | +internal representation of the position scales and their axes. No user breaking |
| 16 | +changes are included. |
| 17 | + |
| 18 | +This release also adds Dewey Dunnington (@paleolimbot) to the core team. |
| 19 | + |
| 20 | +## Breaking changes |
| 21 | +There are no user-facing breaking changes, but a change in some internal |
| 22 | +representations that extension developers may have relied on, along with a few |
| 23 | +breaking visual changes which may cause visual tests in downstream packages to |
| 24 | +fail. |
| 25 | + |
| 26 | +* The `panel_params` field in the `Layout` now contains a list of list of |
| 27 | + `ViewScale` objects, describing the trained coordinate system scales, instead |
| 28 | + of the list object used before. Any extensions that use this field will likely |
| 29 | + break, as will unit tests that checks aspects of this. |
| 30 | + |
| 31 | +* `element_text()` now issues a warning when vectorized arguments are provided, |
| 32 | + as in `colour = c("red", "green", "blue")`. Such use is discouraged and not |
| 33 | + officially supported (@clauswilke, #3492). |
| 34 | + |
| 35 | +* Changed `theme_grey()` setting for legend key so that it creates no border |
| 36 | + (`NA`) rather than drawing a white one. (@annennenne, #3180) |
| 37 | + |
| 38 | +* `geom_ribbon()` now draws separate lines for the upper and lower intervals if |
| 39 | + `colour` is mapped. Similarly, `geom_area()` and `geom_density()` now draw |
| 40 | + the upper lines only in the same case by default. If you want old-style full |
| 41 | + stroking, use `outline.type = "full"` (@yutannihilation, #3503 / @thomasp85, #3708). |
| 42 | + |
| 43 | +## New features |
16 | 44 |
|
17 | 45 | * The evaluation time of aesthetics can now be controlled to a finer degree.
|
18 | 46 | `after_stat()` supersedes the use of `stat()` and `..var..`-notation, and is
|
|
21 | 49 | map a data variable to a stat aesthetic, and remap the same aesthetic to
|
22 | 50 | something else after statistical transformation (@thomasp85, #3534)
|
23 | 51 |
|
24 |
| -* ggplot2 no longer depends on reshape2, which means that it no longer |
25 |
| - (recursively) needs plyr, stringr, or stringi packages. |
| 52 | +* All `coord_*()` functions with `xlim` and `ylim` arguments now accept |
| 53 | + vectors with `NA` as a placeholder for the minimum or maximum value |
| 54 | + (e.g., `ylim = c(0, NA)` would zoom the y-axis from 0 to the |
| 55 | + maximum value observed in the data). This mimics the behaviour |
| 56 | + of the `limits` argument in continuous scale functions |
| 57 | + (@paleolimbot, #2907). |
26 | 58 |
|
27 |
| -* `geom_sf()` now determines the legend type automatically (@microly, #3646). |
| 59 | +* Allowed reversing of discrete scales by re-writing `get_limits()` |
| 60 | + (@AnneLyng, #3115) |
28 | 61 |
|
29 |
| -* `scale_x_continuous()` and `scale_y_continuous()` gains an `n.breaks` argument |
30 |
| - guiding the number of automatic generated breaks (@thomasp85, #3102) |
| 62 | +* All geoms and stats that had a direction (i.e. where the x and y axes had |
| 63 | + different interpretation), can now freely choose their direction, instead of |
| 64 | + relying on `coord_flip()`. The direction is deduced from the aesthetic |
| 65 | + mapping, but can also be specified directly with the new `orientation` |
| 66 | + argument (@thomasp85, #3506). |
| 67 | + |
| 68 | +* Position guides can now be customized using the new `guide_axis()`, which can |
| 69 | + be passed to position `scale_*()` functions or via `guides()`. The new axis |
| 70 | + guide (`guide_axis()`) comes with arguments `check.overlap` (automatic removal |
| 71 | + of overlapping labels), `angle` (easy rotation of axis labels), and |
| 72 | + `n.dodge` (dodge labels into multiple rows/columns) (@paleolimbot, #3322). |
31 | 73 |
|
32 |
| -* `geom_sf()` now removes rows that can't be plotted due to `NA` aesthetics |
33 |
| - (#3546, @thomasp85) |
34 |
| - |
35 | 74 | * A new scale type has been added, that allows binning of aesthetics at the
|
36 | 75 | scale level. It has versions for both position and non-position aesthetics and
|
37 |
| - comes with two new guides (`guide_bins` and `guide_coloursteps`) (@thomasp85, #3096) |
| 76 | + comes with two new guides (`guide_bins` and `guide_coloursteps`) |
| 77 | + (@thomasp85, #3096) |
38 | 78 |
|
39 |
| -* Position guides can now be customized using the new `guide_axis()`, |
40 |
| - which can be passed to position `scale_*()` functions or via |
41 |
| - `guides()`. The new axis guide (`guide_axis()`) comes with |
42 |
| - arguments `check.overlap` (automatic removal of overlapping |
43 |
| - labels), `angle` (easy rotation of axis labels), and |
44 |
| - `n.dodge` (dodge labels into multiple rows/columns) (@paleolimbot, #3322). |
45 |
| - |
46 |
| -* `Geom` now gains a `setup_params()` method in line with the other ggproto |
47 |
| - classes (@thomasp85, #3509) |
48 |
| - |
49 |
| -* The newly added function `register_theme_elements()` now allows developers |
50 |
| - of extension packages to define their own new theme elements and place them |
51 |
| - into the ggplot2 element tree (@clauswilke, #2540). |
52 |
| - |
53 |
| -* `element_text()` now issues a warning when vectorized arguments are provided, as in |
54 |
| - `colour = c("red", "green", "blue")`. Such use is discouraged and not officially supported |
55 |
| - (@clauswilke, #3492). |
56 |
| - |
57 |
| -* Addition of partial themes to plots has been made more predictable; |
58 |
| - stepwise addition of individual partial themes is now equivalent to |
59 |
| - addition of multple theme elements at once (@clauswilke, #3039). |
60 |
| - |
61 |
| -* stacking text when calculating the labels and the y axis with |
62 |
| - `stat_summary()` now works (@ikosmidis, #2709) |
63 |
| - |
64 |
| -* Allowed reversing of discrete scales by re-writing `get_limits()` (@AnneLyng, #3115) |
| 79 | +* `scale_x_continuous()` and `scale_y_continuous()` gains an `n.breaks` argument |
| 80 | + guiding the number of automatic generated breaks (@thomasp85, #3102) |
65 | 81 |
|
66 | 82 | * Added `stat_contour_filled()` and `geom_contour_filled()`, which compute
|
67 |
| - and draw filled contours of gridded data (@paleolimbot, #3044). |
68 |
| - |
69 |
| -* `geom_contour()` and `stat_contour()` now use the isoband package |
| 83 | + and draw filled contours of gridded data (@paleolimbot, #3044). |
| 84 | + `geom_contour()` and `stat_contour()` now use the isoband package |
70 | 85 | to compute contour lines. The `complete` parameter (which was undocumented
|
71 | 86 | and has been unused for at least four years) was removed (@paleolimbot, #3044).
|
72 |
| - |
73 |
| -* `stat_smooth()` uses `REML` by default, if `method = "gam"` and |
74 |
| - `gam`'s method is not specified (@ikosmidis, #2630). |
75 |
| - |
76 |
| -* Changed `theme_grey()` setting for legend key so that it creates no |
77 |
| - border (`NA`) rather than drawing a white one. (@annennenne, #3180) |
78 | 87 |
|
79 | 88 | * Themes have gained two new parameters, `plot.title.position` and
|
80 | 89 | `plot.caption.position`, that can be used to customize how plot
|
81 | 90 | title/subtitle and plot caption are positioned relative to the overall plot
|
82 | 91 | (@clauswilke, #3252).
|
83 | 92 |
|
84 |
| -* Added function `ggplot_add.by()` for lists created with `by()` (#2734, @Maschette) |
85 |
| - |
86 |
| -* `gg_dep()` was deprecated (@perezp44, #3382). |
| 93 | +## Extensions |
| 94 | + |
| 95 | +* `Geom` now gains a `setup_params()` method in line with the other ggproto |
| 96 | + classes (@thomasp85, #3509) |
87 | 97 |
|
88 |
| -* Added weight aesthetic option to `stat_density()` and made scaling of |
89 |
| - weights the default (@annennenne, #2902) |
| 98 | +* The newly added function `register_theme_elements()` now allows developers |
| 99 | + of extension packages to define their own new theme elements and place them |
| 100 | + into the ggplot2 element tree (@clauswilke, #2540). |
90 | 101 |
|
91 |
| -* `expand_scale()` was deprecated in favour of `expansion()` for setting |
92 |
| - the `expand` argument of `x` and `y` scales (@paleolimbot). |
| 102 | +## Minor improvements and bug fixes |
93 | 103 |
|
94 | 104 | * `coord_trans()` now draws second axes and accepts `xlim`, `ylim`,
|
95 | 105 | and `expand` arguments to bring it up to feature parity with
|
|
104 | 114 | in `coord_trans()` was also updated such that it behaves identically
|
105 | 115 | to that in `coord_cartesian()` (@paleolimbot, #3338).
|
106 | 116 |
|
107 |
| -* All `coord_*()` functions with `xlim` and `ylim` arguments now accept |
108 |
| - vectors with `NA` as a placeholder for the minimum or maximum value |
109 |
| - (e.g., `ylim = c(0, NA)` would zoom the y-axis from 0 to the |
110 |
| - maximum value observed in the data). This mimics the behaviour |
111 |
| - of the `limits` argument in continuous scale functions |
112 |
| - (@paleolimbot, #2907). |
| 117 | +* `expand_scale()` was deprecated in favour of `expansion()` for setting |
| 118 | + the `expand` argument of `x` and `y` scales (@paleolimbot). |
113 | 119 |
|
114 | 120 | * `geom_abline()`, `geom_hline()`, and `geom_vline()` now issue
|
115 | 121 | more informative warnings when supplied with set aesthetics
|
116 | 122 | (i.e., `slope`, `intercept`, `yintercept`, and/or `xintercept`)
|
117 | 123 | and mapped aesthetics (i.e., `data` and/or `mapping`).
|
| 124 | + |
| 125 | +* Fix a bug in `geom_raster()` that squeezed the image when it went outside |
| 126 | + scale limits (#3539, @thomasp85) |
| 127 | + |
| 128 | +* `geom_sf()` now determines the legend type automatically (@microly, #3646). |
118 | 129 |
|
119 |
| -* `stat_density2d()` can now take an `adjust` parameter to scale the default bandwidth. (#2860, @haleyjeppson) |
| 130 | +* `geom_sf()` now removes rows that can't be plotted due to `NA` aesthetics |
| 131 | + (#3546, @thomasp85) |
120 | 132 |
|
121 |
| -* Fix a bug when `show.legend` is a named logical vector (#3461, @yutannihilation). |
| 133 | +* `geom_sf()` now applies alpha to linestring geometries |
| 134 | + (#3589, @yutannihilation). |
| 135 | + |
| 136 | +* `gg_dep()` was deprecated (@perezp44, #3382). |
122 | 137 |
|
123 |
| -* Increase the default `nbin` of `guide_colourbar()` to place the ticks more precisely (#3508, @yutannihilation). |
| 138 | +* Added function `ggplot_add.by()` for lists created with `by()`, allowing such |
| 139 | + lists to be added to ggplot objects (#2734, @Maschette) |
| 140 | + |
| 141 | +* ggplot2 no longer depends on reshape2, which means that it no longer |
| 142 | + (recursively) needs plyr, stringr, or stringi packages. |
124 | 143 |
|
125 |
| -* `geom_sf()` now applies alpha to linestring geometries (#3589, @yutannihilation). |
| 144 | +* Increase the default `nbin` of `guide_colourbar()` to place the ticks more |
| 145 | + precisely (#3508, @yutannihilation). |
126 | 146 |
|
127 | 147 | * `manual_scale()` now matches `values` with the order of `breaks` whenever
|
128 | 148 | `values` is an unnamed vector. Previously, unnamed `values` would match with
|
129 | 149 | the limits of the scale and ignore the order of any `breaks` provided. Note
|
130 | 150 | that this may change the appearance of plots that previously relied on the
|
131 | 151 | unordered behaviour (#2429, @idno0001).
|
| 152 | + |
| 153 | +* `scale_manual_*(limits = ...)` now actually limits the scale (#3262, |
| 154 | + @yutannihilation). |
| 155 | + |
| 156 | +* Fix a bug when `show.legend` is a named logical vector |
| 157 | + (#3461, @yutannihilation). |
| 158 | + |
| 159 | +* Added weight aesthetic option to `stat_density()` and made scaling of |
| 160 | + weights the default (@annennenne, #2902) |
| 161 | + |
| 162 | +* `stat_density2d()` can now take an `adjust` parameter to scale the default |
| 163 | + bandwidth. (#2860, @haleyjeppson) |
| 164 | + |
| 165 | +* `stat_smooth()` uses `REML` by default, if `method = "gam"` and |
| 166 | + `gam`'s method is not specified (@ikosmidis, #2630). |
| 167 | + |
| 168 | +* stacking text when calculating the labels and the y axis with |
| 169 | + `stat_summary()` now works (@ikosmidis, #2709) |
132 | 170 |
|
133 | 171 | * `stat_summary()` and related functions now support rlang-style lambda functions
|
134 | 172 | (#3568, @dkahle).
|
135 | 173 |
|
136 |
| -* `geom_ribbon()` now draws separate lines for the upper and lower intervals if |
137 |
| - `colour` is mapped by default. Similarly, `geom_area()` now draws lines for |
138 |
| - the upper in the same case by default. If you want old-style full stroking, use |
139 |
| - `outline.type = "legacy"` (#3503, @yutannihilation). |
| 174 | +* The data mask pronoun, `.data`, is now stripped from default labels. |
140 | 175 |
|
141 |
| -* `scale_manual_*(limits = ...)` now actually limits the scale (#3262, |
142 |
| - @yutannihilation). |
| 176 | +* Addition of partial themes to plots has been made more predictable; |
| 177 | + stepwise addition of individual partial themes is now equivalent to |
| 178 | + addition of multple theme elements at once (@clauswilke, #3039). |
143 | 179 |
|
| 180 | +* Facets now don't fail even when some variable in the spec are not available |
| 181 | + in all layers (@yutannihilation, #2963). |
144 | 182 |
|
145 | 183 | # ggplot2 3.2.1
|
146 | 184 |
|
|
0 commit comments