|
1 | | -# ggplot2 3.0.0.9000 |
| 1 | +# ggplot2 3.1.0 |
2 | 2 |
|
3 | | -* `geom_boxplot()` now understands the `width` parameter even when used with |
4 | | - a non-standard stat, such as `stat_identity()` (@clauswilke, #2893). |
5 | | - |
6 | | -* `scale_*_date()`, `scale_*_time()` and `scale_*_datetime()` can now display |
7 | | - a secondary axis that is a __one-to-one__ transformation of the primary axis, |
8 | | - implemented using the `sec.axis` argument to the scale constructor |
9 | | - (@dpseidel, #2244). |
| 3 | +## Breaking changes |
10 | 4 |
|
11 | | -* The error message in `compute_aesthetics()` now provides the names of only |
12 | | - aesthetics with mismatched lengths, rather than all aesthetics (@karawoo, |
13 | | - #2853). |
14 | | - |
15 | | -* `coord_sf()` now respects manual setting of axis tick labels (@clauswilke, |
16 | | - #2857, #2881). |
17 | | - |
18 | | -* `coord_sf()` now accepts two new parameters, `label_graticule` and `label_axes`, |
19 | | - that can be used to specify which graticules to label on which side of the plot |
20 | | - (@clauswilke, #2846). |
| 5 | +This is a minor release and breaking changes have been kept to a minimum. End users of ggplot2 are unlikely to encounter any issues. However, there are a few items that developers of ggplot2 extensions should be aware of. For additional details, see also the discussion accompanying issue #2890. |
| 6 | + |
| 7 | +* In non-user-facing internal code (specifically in the `aes()` function and in |
| 8 | + the `aesthetics` argument of scale functions), ggplot2 now always uses the British |
| 9 | + spelling for aesthetics containing the word "colour". When users specify a "color" |
| 10 | + aesthetic it is automatically renamed to "colour". This renaming is also applied |
| 11 | + to non-standard aesthetics that contain the word "color". For example, "point_color" |
| 12 | + is renamed to "point_colour". This convention makes it easier to support both |
| 13 | + British and American spelling for novel, non-standard aesthetics, but it may require |
| 14 | + some adjustment for packages that have previously introduced non-standard color |
| 15 | + aesthetics using American spelling. A new function `standardise_aes_names()` is |
| 16 | + provided in case extension writers need to perform this renaming in their own code |
| 17 | + (@clauswilke, #2649). |
| 18 | + |
| 19 | +* Functions that generate other functions (closures) now force the arguments that are |
| 20 | + used from the generated functions, to avoid hard-to-catch errors. This may affect |
| 21 | + some users of manual scales (such as `scale_colour_manual()`, `scale_fill_manual()`, |
| 22 | + etc.) who depend on incorrect behavior (@krlmlr, #2807). |
21 | 23 |
|
22 | 24 | * `Coord` objects now have a function `backtransform_range()` that returns the |
23 | 25 | panel range in data coordinates. This change may affect developers of custom coords, |
24 | 26 | who now should implement this function. It may also affect developers of custom |
25 | 27 | geoms that use the `range()` function. In some applications, `backtransform_range()` |
26 | | - may be more appropriate. |
27 | | - (@clauswilke, #2821). |
| 28 | + may be more appropriate (@clauswilke, #2821). |
28 | 29 |
|
29 | | -* `geom_sf()` now respects `lineend`, `linejoin`, and `linemitre` parameters |
30 | | - for lines and polygons (@alistaire47, #2826) |
31 | 30 |
|
32 | | -* `geom_hline()`, `geom_vline()`, and `geom_abline()` now work properly |
33 | | - with `coord_trans()` (@clauswilke, #2149, #2812). |
| 31 | +## New features |
| 32 | + |
| 33 | +* `coord_sf()` has much improved customization of axis tick labels. Labels can now |
| 34 | + be set manually, and there are two new parameters, `label_graticule` and |
| 35 | + `label_axes`, that can be used to specify which graticules to label on which side |
| 36 | + of the plot (@clauswilke, #2846, #2857, #2881). |
| 37 | + |
| 38 | +* Two new geoms `geom_sf_label()` and `geom_sf_text()` can draw labels and text |
| 39 | + on sf objects. Under the hood, a new `stat_sf_coordinates()` calculates the |
| 40 | + x and y coordinates from the coordinates of the sf geometries. You can customize |
| 41 | + the calculation method via `fun.geometry` argument (@yutannihilation, #2761). |
| 42 | + |
| 43 | + |
| 44 | +## Minor improvements and fixes |
34 | 45 |
|
35 | 46 | * `benchplot()` now uses tidy evaluation (@dpseidel, #2699). |
36 | 47 |
|
| 48 | +* The error message in `compute_aesthetics()` now only provides the names of |
| 49 | + aesthetics with mismatched lengths, rather than all aesthetics (@karawoo, |
| 50 | + #2853). |
| 51 | + |
| 52 | +* For faceted plots, data is no longer internally reordered. This makes it |
| 53 | + safer to feed data columns into `aes()` or into parameters of geoms or |
| 54 | + stats. However, doing so remains discouraged (@clauswilke, #2694). |
| 55 | + |
37 | 56 | * `fortify()` now displays a more informative error message for |
38 | 57 | `grouped_df()` objects when dplyr is not installed (@jimhester, #2822). |
39 | 58 |
|
40 | 59 | * All `geom_*()` now display an informative error message when required |
41 | | - aesthetics are missing (@dpseidel, #2637 and #2706).s |
42 | | - |
43 | | -* `sec_axis()` and `dup_axis()` now return appropriate breaks for the secondary |
44 | | - axis when applied to log transformed scales (@dpseidel, #2729). |
45 | | - |
46 | | -* `sec_axis()` now works as expected when used in combination with tidy eval |
47 | | - (@dpseidel, #2788). |
48 | | - |
49 | | -* `stat_contour()`, `stat_density2d()`, `stat_bin2d()`, `stat_binhex()` |
50 | | - now calculate normalized statistics including `nlevel`, `ndensity`, and |
51 | | - `ncount`. Also, `stat_density()` now includes the calculated statistic |
52 | | - `nlevel`, an alias for `scaled`, to better match the syntax of `stat_bin()` |
53 | | - (@bjreisman, #2679). |
| 60 | + aesthetics are missing (@dpseidel, #2637 and #2706). |
54 | 61 |
|
| 62 | +* `geom_boxplot()` now understands the `width` parameter even when used with |
| 63 | + a non-standard stat, such as `stat_identity()` (@clauswilke, #2893). |
| 64 | + |
55 | 65 | * `geom_hex()` now understands the `size` and `linetype` aesthetics |
56 | 66 | (@mikmart, #2488). |
57 | | - |
58 | | -* Data is no longer internally reordered when faceting. This makes it safer to |
59 | | - feed data columns into `aes()` or into parameters of geoms or stats. However, |
60 | | - doing so remains discouraged (@clauswilke, #2694). |
| 67 | + |
| 68 | +* `geom_hline()`, `geom_vline()`, and `geom_abline()` now work properly |
| 69 | + with `coord_trans()` (@clauswilke, #2149, #2812). |
| 70 | + |
| 71 | +* `geom_text(..., parse = TRUE)` now correctly renders the expected number of |
| 72 | + items instead of silently dropping items that are empty expressions, e.g. |
| 73 | + the empty string "". If an expression spans multiple lines, we take just |
| 74 | + the first line and drop the rest. This same issue is also fixed for |
| 75 | + `geom_label()` and the axis labels for `geom_sf()` (@slowkow, #2867). |
| 76 | + |
| 77 | +* `geom_sf()` now respects `lineend`, `linejoin`, and `linemitre` parameters |
| 78 | + for lines and polygons (@alistaire47, #2826). |
61 | 79 |
|
62 | 80 | * `ggsave()` now exits without creating a new graphics device if previously |
63 | 81 | none was open (@clauswilke, #2363). |
64 | 82 |
|
65 | | -* Aesthetic names are now consistently standardised both in `aes()` and in the |
66 | | - `aesthetics` argument of scale functions. Also, the US spelling "color" |
67 | | - is now always internally converted to "colour", even when part of a longer |
68 | | - aesthetic name (e.g., `point_color`) (@clauswilke, #2649). |
69 | | - |
70 | | -* New `geom_sf_label()` and `geom_sf_text()` draw labels and text on sf objects. |
71 | | - Under the hood, new `stat_sf_coordinates()` calculates the x and y from the |
72 | | - coordinates of the geometries. You can customize the calculation method via |
73 | | - `fun.geometry` argument (@yutannihilation, #2761). |
74 | | - |
75 | 83 | * `labs()` now has named arguments `title`, `subtitle`, `caption`, and `tag`. |
76 | 84 | Also, `labs()` now accepts tidyeval (@yutannihilation, #2669). |
77 | 85 |
|
78 | 86 | * `position_nudge()` is now more robust and nudges only in the direction |
79 | 87 | requested. This enables, for example, the horizontal nudging of boxplots |
80 | 88 | (@clauswilke, #2733). |
| 89 | + |
| 90 | +* `sec_axis()` and `dup_axis()` now return appropriate breaks for the secondary |
| 91 | + axis when applied to log transformed scales (@dpseidel, #2729). |
| 92 | + |
| 93 | +* `sec_axis()` now works as expected when used in combination with tidy eval |
| 94 | + (@dpseidel, #2788). |
| 95 | + |
| 96 | +* `scale_*_date()`, `scale_*_time()` and `scale_*_datetime()` can now display |
| 97 | + a secondary axis that is a __one-to-one__ transformation of the primary axis, |
| 98 | + implemented using the `sec.axis` argument to the scale constructor |
| 99 | + (@dpseidel, #2244). |
81 | 100 |
|
82 | | -* `geom_text(..., parse = TRUE)` now correctly renders the expected number of |
83 | | - items instead of silently dropping items that are empty expressions, e.g. |
84 | | - the empty string "". If an expression spans multiple lines, we take just |
85 | | - the first line and drop the rest. This same issue is also fixed for |
86 | | - `geom_label()` and the axis labels for `geom_sf()` (@slowkow, #2867). |
| 101 | +* `stat_contour()`, `stat_density2d()`, `stat_bin2d()`, `stat_binhex()` |
| 102 | + now calculate normalized statistics including `nlevel`, `ndensity`, and |
| 103 | + `ncount`. Also, `stat_density()` now includes the calculated statistic |
| 104 | + `nlevel`, an alias for `scaled`, to better match the syntax of `stat_bin()` |
| 105 | + (@bjreisman, #2679). |
| 106 | + |
87 | 107 |
|
88 | 108 | # ggplot2 3.0.0 |
89 | 109 |
|
|
0 commit comments