|
1 |
| -# ggplot2 (development version) |
| 1 | +# ggplot2 3.3.4 |
| 2 | +This is a larger patch release fixing a huge number of bugs and introduces a |
| 3 | +small selection of feature refinements. |
2 | 4 |
|
3 |
| -* Manual scales now allow named vectors passed to `values` to contain fewer |
4 |
| - elements than existing in the data. Elements not present in values will be set |
5 |
| - to `NA` (@thomasp85, #3451) |
6 |
| - |
7 |
| -* Remove cross-inheritance of default discrete colour/fill scales and check the |
8 |
| - type and aesthetic of function output if `type` is a function |
9 |
| - (@thomasp85, #4149) |
| 5 | +## Features |
| 6 | + |
| 7 | +* Alt-text can now be added to a plot using the `alt` label, i.e |
| 8 | + `+ labs(alt = ...)`. Currently this alt text is not automatically propagated, |
| 9 | + but we plan to integrate into Shiny, RMarkdown, and other tools in the future. |
| 10 | + (@thomasp85, #4477) |
10 | 11 |
|
11 | 12 | * Add support for the BrailleR package for creating descriptions of the plot
|
12 | 13 | when rendered (@thomasp85, #4459)
|
| 14 | + |
| 15 | +* `coord_sf()` now has an argument `default_crs` that specifies the coordinate |
| 16 | + reference system (CRS) for non-sf layers and scale/coord limits. This argument |
| 17 | + defaults to `NULL`, which means non-sf layers are assumed to be in projected |
| 18 | + coordinates, as in prior ggplot2 versions. Setting `default_crs = sf::st_crs(4326)` |
| 19 | + provides a simple way to interpret x and y positions as longitude and latitude, |
| 20 | + regardless of the CRS used by `coord_sf()`. Authors of extension packages |
| 21 | + implementing `stat_sf()`-like functionality are encouraged to look at the source |
| 22 | + code of `stat_sf()`'s `compute_group()` function to see how to provide scale-limit |
| 23 | + hints to `coord_sf()` (@clauswilke, #3659). |
| 24 | + |
| 25 | +* `ggsave()` now uses ragg to render raster output if ragg is available. It also |
| 26 | + handles custom devices that sets a default unit (e.g. `ragg::agg_png`) |
| 27 | + correctly (@thomasp85, #4388) |
13 | 28 |
|
14 |
| -* Fix a bug in the layer implementation that introduced a new state after the |
15 |
| - first render which could lead to a different look when rendered the second |
16 |
| - time (@thomasp85, #4204) |
| 29 | +* `ggsave()` now returns the saved file location invisibly (#3379, @eliocamp). |
| 30 | + |
| 31 | +* The scale arguments `limits`, `breaks`, `minor_breaks`, `labels`, `rescaler` |
| 32 | + and `oob` now accept purrr style lambda notation (@teunbrand, #4427). The same |
| 33 | + is true for `as_labeller()` (and therefore also `labeller()`) |
| 34 | + (@netique, #4188). |
| 35 | + |
| 36 | +* Manual scales now allow named vectors passed to `values` to contain fewer |
| 37 | + elements than existing in the data. Elements not present in values will be set |
| 38 | + to `NA` (@thomasp85, #3451) |
17 | 39 |
|
18 |
| -* Make sure `label_bquote()` has access to the calling environment when |
19 |
| - evaluating the labels (@thomasp85, #4141) |
| 40 | +* Date and datetime position scales support out-of-bounds (oob) arguments to |
| 41 | + control how limits affect data outside those limits (@teunbrand, #4199). |
| 42 | + |
| 43 | +## Fixes |
| 44 | + |
| 45 | +* Fix a bug that `after_stat()` and `after_scale()` cannot refer to aesthetics |
| 46 | + if it's specified in the plot-global mapping (@yutannihilation, #4260). |
20 | 47 |
|
21 | 48 | * Fix bug in `annotate_logticks()` that would cause an error when used together
|
22 | 49 | with `coord_flip()` (@thomasp85, #3954)
|
23 | 50 |
|
24 |
| -* Fix a bug in `guide_bins()` where keys would disappear if the guide was |
25 |
| - reversed (@thomasp85, #4210) |
| 51 | +* Fix a bug in `geom_abline()` that resulted in `intercept` not being subjected |
| 52 | + to the transformation of the y scale (@thomasp85, #3741) |
| 53 | + |
| 54 | +* Extent the range of the line created by `geom_abline()` so that line ending |
| 55 | + is not visible for large linewidths (@thomasp85, #4024) |
| 56 | + |
| 57 | +* Fix bug in `geom_dotplot()` where dots would be positioned wrong with |
| 58 | + `stackgroups = TRUE` (@thomasp85, #1745) |
| 59 | + |
| 60 | +* Fix calculation of confidence interval for locfit smoothing in `geom_smooth()` |
| 61 | + (@topepo, #3806) |
26 | 62 |
|
27 | 63 | * Fix bug in `geom_text()` where `"outward"` and `"inward"` justification for
|
28 | 64 | some `angle` values was reversed (@aphalo, #4169, #4447)
|
29 | 65 |
|
30 |
| -* Fix a bug in legend justification where justification was lost of the legend |
31 |
| - dimensions exceeded the available size (@thomasp85, #3635) |
32 |
| - |
33 |
| -* Fix calculation of confidence interval for locfit smoothing (@topepo, #3806) |
| 66 | +* `ggsave()` now sets the default background to match the fill value of the |
| 67 | + `plot.background` theme element (@karawoo, #4057) |
34 | 68 |
|
35 |
| -* Fix bug in `scale_[x|y]_date()` where custom breaks functions that resulted in |
36 |
| - fracional dates would get misaligned (@thomasp85, #3965) |
37 |
| - |
38 |
| -* Fix bug in `scale_[x|y]_datetime()` where a specified timezone would be |
39 |
| - ignored by the scale (@thomasp85, #4007) |
40 |
| - |
41 |
| -* Using `theme(aspect.ratio = ...)` together with free space in `facet_grid()` |
42 |
| - now crrectly throws an error (@thomasp85, #3834) |
43 |
| - |
44 |
| -* Fix a bug in `stat_summary_bin()` where one more than the requested number of |
45 |
| - bins would be created (@thomasp85, #3824) |
46 |
| - |
47 |
| -* Fix issue in `sec_axis()` that would throw warnings in the absence of any |
48 |
| - secondary breaks (@thomasp85, #4368) |
| 69 | +* It is now deprecated to specify `guides(<scale> = FALSE)` or |
| 70 | + `scale_*(guide = FALSE)` to remove a guide. Please use |
| 71 | + `guides(<scale> = "none")` or `scale_*(guide = "none")` instead |
| 72 | + (@yutannihilation, #4094). |
49 | 73 |
|
50 |
| -* Fix a bug in `geom_abline()` that resulted in `intercept` not being subjected |
51 |
| - to the transformation of the y scale (@thomasp85, #3741) |
| 74 | +* Fix a bug in `guide_bins()` where keys would disappear if the guide was |
| 75 | + reversed (@thomasp85, #4210) |
52 | 76 |
|
53 | 77 | * Fix bug in `guide_coloursteps()` that would repeat the terminal bins if the
|
54 | 78 | breaks coincided with the limits of the scale (@thomasp85, #4019)
|
55 |
| - |
56 |
| -* Extent the range of the line created by `geom_abline()` so that line ending |
57 |
| - is not visible for large linewidths (@thomasp85, #4024) |
58 | 79 |
|
59 | 80 | * Make sure that default labels from default mappings doesn't overwrite default
|
60 | 81 | labels from explicit mappings (@thomasp85, #2406)
|
61 |
| - |
62 |
| -* `stat_count()` now computes width based on the full dataset instead of per |
63 |
| - group (@thomasp85, #2047) |
64 | 82 |
|
65 | 83 | * Fix bug in `labeller()` where parsing was turned off if `.multiline = FALSE`
|
66 | 84 | (@thomasp85, #4084)
|
67 | 85 |
|
68 |
| -* Fix a bug in `qplot()` when supplying `c(NA, NA)` as axis limits |
69 |
| - (@thomasp85, #4027) |
| 86 | +* Make sure `label_bquote()` has access to the calling environment when |
| 87 | + evaluating the labels (@thomasp85, #4141) |
70 | 88 |
|
71 |
| -* Fix bug in `geom_dotplot()` where dots would be positioned wrong with |
72 |
| - `stackgroups = TRUE` (@thomasp85, #1745) |
| 89 | +* Fix a bug in the layer implementation that introduced a new state after the |
| 90 | + first render which could lead to a different look when rendered the second |
| 91 | + time (@thomasp85, #4204) |
73 | 92 |
|
74 |
| -* Make sure position_jitter creates the same jittering independent of whether it |
75 |
| - is called by name or with constructor (@thomasp85, #2507) |
| 93 | +* Fix a bug in legend justification where justification was lost of the legend |
| 94 | + dimensions exceeded the available size (@thomasp85, #3635) |
76 | 95 |
|
77 | 96 | * Fix a bug in `position_dodge2()` where `NA` values in thee data would cause an
|
78 | 97 | error (@thomasp85, #2905)
|
79 | 98 |
|
| 99 | +* Make sure `position_jitter()` creates the same jittering independent of |
| 100 | + whether it is called by name or with constructor (@thomasp85, #2507) |
| 101 | + |
80 | 102 | * Fix a bug in `position_jitter()` where different jitters would be applied to
|
81 | 103 | different position aesthetics of the same axis (@thomasp85, #2941)
|
82 |
| - |
83 |
| -* `ggsave()` now uses ragg to render raster output if ragg is available |
84 |
| - (@thomasp85, #4388) |
85 | 104 |
|
86 |
| -* `coord_sf()` now has an argument `default_crs` that specifies the coordinate |
87 |
| - reference system (CRS) for non-sf layers and scale/coord limits. This argument |
88 |
| - defaults to the World Geodetic System 1984 (WGS84), which means x and y positions |
89 |
| - are interpreted as longitude and latitude. This is a potentially breaking change |
90 |
| - for users who use projected coordinates in non-sf layers or in limits. Setting |
91 |
| - `default_crs = NULL` recovers the old behavior. Further, authors of extension |
92 |
| - packages implementing `stat_sf()`-like functionality are encouraged to look at the |
93 |
| - source code of `stat_sf()`'s `compute_group()` function to see how to provide |
94 |
| - scale-limit hints to `coord_sf()` (@clauswilke, #3659). |
95 |
| - |
96 |
| -* `ggsave()` now sets the default background to match the fill value of the |
97 |
| - `plot.background` theme element (@karawoo, #4057) |
98 |
| - |
99 |
| -* Extended `stat_ecdf()` to calculate the cdf from either x or y instead from y only (@jgjl, #4005). |
| 105 | +* Fix a bug in `qplot()` when supplying `c(NA, NA)` as axis limits |
| 106 | + (@thomasp85, #4027) |
| 107 | + |
| 108 | +* Remove cross-inheritance of default discrete colour/fill scales and check the |
| 109 | + type and aesthetic of function output if `type` is a function |
| 110 | + (@thomasp85, #4149) |
100 | 111 |
|
101 |
| -* Fixed a bug in `labeller()` so that `.default` is passed to `as_labeller()` |
102 |
| - when labellers are specified by naming faceting variables. (@waltersom, #4031) |
| 112 | +* Fix bug in `scale_[x|y]_date()` where custom breaks functions that resulted in |
| 113 | + fracional dates would get misaligned (@thomasp85, #3965) |
103 | 114 |
|
104 |
| -* Updated style for example code (@rjake, #4092) |
| 115 | +* Fix bug in `scale_[x|y]_datetime()` where a specified timezone would be |
| 116 | + ignored by the scale (@thomasp85, #4007) |
| 117 | + |
| 118 | +* Fix issue in `sec_axis()` that would throw warnings in the absence of any |
| 119 | + secondary breaks (@thomasp85, #4368) |
105 | 120 |
|
106 |
| -* Only drop groups in `stat_ydensity()` when there are fewer than two data points and throw a warning (@andrewwbutler, #4111). |
| 121 | +* `stat_bin()`'s computed variable `width` is now documented (#3522). |
| 122 | + |
| 123 | +* `stat_count()` now computes width based on the full dataset instead of per |
| 124 | + group (@thomasp85, #2047) |
107 | 125 |
|
108 |
| -* It is now deprecated to specify `guides(<scale> = FALSE)` or |
109 |
| - `scale_*(guide = FALSE)` to remove a guide. Please use |
110 |
| - `guides(<scale> = "none")` or `scale_*(guide = "none")` instead |
111 |
| - (@yutannihilation, #4094). |
| 126 | +* Extended `stat_ecdf()` to calculate the cdf from either x or y instead from y |
| 127 | + only (@jgjl, #4005) |
112 | 128 |
|
113 |
| -* Date and datetime position scales support out-of-bounds (oob) arguments to |
114 |
| - control how limits affect data outside those limits (@teunbrand, #4199). |
| 129 | +* Fix a bug in `stat_summary_bin()` where one more than the requested number of |
| 130 | + bins would be created (@thomasp85, #3824) |
115 | 131 |
|
116 |
| -* `stat_bin()`'s computed variable `width` is now documented (#3522). |
| 132 | +* Only drop groups in `stat_ydensity()` when there are fewer than two data |
| 133 | + points and throw a warning (@andrewwbutler, #4111). |
117 | 134 |
|
118 | 135 | * Fixed a bug in strip assembly when theme has `strip.text = element_blank()`
|
119 | 136 | and plots are faceted with multi-layered strips (@teunbrand, #4384).
|
| 137 | + |
| 138 | +* Using `theme(aspect.ratio = ...)` together with free space in `facet_grid()` |
| 139 | + now crrectly throws an error (@thomasp85, #3834) |
| 140 | + |
| 141 | +* Fixed a bug in `labeller()` so that `.default` is passed to `as_labeller()` |
| 142 | + when labellers are specified by naming faceting variables. (@waltersom, #4031) |
| 143 | + |
| 144 | +* Updated style for example code (@rjake, #4092) |
120 | 145 |
|
121 | 146 | * ggplot2 now requires R >= 3.3 (#4247).
|
122 | 147 |
|
|
127 | 152 | * Improved error with hint when piping a `ggplot` object into a facet function
|
128 | 153 | (#4379, @mitchelloharawild).
|
129 | 154 |
|
130 |
| -* Fix a bug that `after_stat()` and `after_scale()` cannot refer to aesthetics |
131 |
| - if it's specified in the plot-global mapping (@yutannihilation, #4260). |
132 |
| - |
133 |
| -* `ggsave()` now returns the saved file location invisibly (#3379, @eliocamp). |
134 |
| - |
135 |
| -* The scale arguments `limits`, `breaks`, `minor_breaks`, `labels`, `rescaler` |
136 |
| - and `oob` now accept purrr style lambda notation (@teunbrand, #4427). |
137 |
| - |
138 |
| -* `as_labeller()` (and therefore also `labeller()`) now handles functions in |
139 |
| - purrr-style lambda notation (@netique, #4188). |
140 |
| - |
141 | 155 | # ggplot2 3.3.3
|
142 | 156 | This is a small patch release mainly intended to address changes in R and CRAN.
|
143 | 157 | It further changes the licensing model of ggplot2 to an MIT license.
|
|
0 commit comments