|
1 |
| -# ggplot2 2.0.0.9000 |
| 1 | +# ggplot2 2.1.0.9000 |
2 | 2 |
|
3 |
| -## Bug fixes and minor improvements |
| 3 | +* `x` and `y` scales are now symmetric regarding the list of |
| 4 | + aesthetics they accept: `xmin_final`, `xmax_final`, `xlower`, |
| 5 | + `xmiddle` and `xupper` are now valid `x` aesthetics. |
4 | 6 |
|
5 |
| -* Fixed a compatibility issue with `ggproto` and R versions prior to 3.1.2. |
6 |
| - (#1444) |
| 7 | +* `ggtitle()` and `labs()` take a `subtitle` parameter which makes it |
| 8 | + possible to add a subtitle below the main plot title. (@hrbrmstr) |
| 9 | + |
| 10 | +* `labs()` takes a `caption` parameter that will set the label for |
| 11 | + the annotation text below the plot panels. (@JanSchulz) |
| 12 | + |
| 13 | +* The main plot title and subtitle are left-justified (`hjust = 0`) by |
| 14 | + default. The `caption` annotation below the plot will be right-justified |
| 15 | + by default. (@hrbrmstr) |
| 16 | + |
| 17 | +* Minor code formatting issues in examples and function parameters were |
| 18 | + fixed. (@hrbrmstr) |
| 19 | + |
| 20 | +# ggplot2 2.1.0 |
| 21 | + |
| 22 | +## New features |
| 23 | + |
| 24 | +* When mapping an aesthetic to a constant (e.g. |
| 25 | + `geom_smooth(aes(colour = "loess")))`), the default guide title is the name |
| 26 | + of the aesthetic (i.e. "colour"), not the value (i.e. "loess") (#1431). |
| 27 | + |
| 28 | +* `layer()` now accepts a function as the data argument. The function will be |
| 29 | + applied to the data passed to the `ggplot()` function and must return a |
| 30 | + data.frame (#1527, @thomasp85). This is a more general version of the |
| 31 | + deprecated `subset` argument. |
| 32 | + |
| 33 | +* `theme_update()` now uses the `+` operator instead of `%+replace%`, so that |
| 34 | + unspecified values will no longer be `NULL`ed out. `theme_replace()` |
| 35 | + preserves the old behaviour if desired (@oneillkza, #1519). |
| 36 | + |
| 37 | +* `stat_bin()` has been overhauled to use the same algorithm as ggvis, which |
| 38 | + has been considerably improved thanks to the advice of Randy Prium (@rpruim). |
| 39 | + This includes: |
| 40 | + |
| 41 | + * Better arguments and a better algorithm for determining the origin. |
| 42 | + You can now specify either `boundary` or the `center` of a bin. |
| 43 | + `origin` has been deprecated in favour of these arguments. |
| 44 | + |
| 45 | + * `drop` is deprecated in favour of `pad`, which adds extra 0-count bins |
| 46 | + at either end (needed for frequency polygons). `geom_histogram()` defaults |
| 47 | + to `pad = FALSE` which considerably improves the default limits for |
| 48 | + the histogram, especially when the bins are big (#1477). |
| 49 | + |
| 50 | + * The default algorithm does a (somewhat) better job at picking nice widths |
| 51 | + and origins across a wider range of input data. |
| 52 | + |
| 53 | + * `bins = n` now gives a histogram with `n` bins, not `n + 1` (#1487). |
| 54 | + |
| 55 | +## Bug fixes |
| 56 | + |
| 57 | +* All `\donttest{}` examples run. |
| 58 | + |
| 59 | +* All `geom_()` and `stat_()` functions now have consistent argument order: |
| 60 | + data + mapping, then geom/stat/position, then `...`, then specific arguments, |
| 61 | + then arguments common to all layers (#1305). This may break code if you were |
| 62 | + previously relying on partial name matching, but in the long-term should make |
| 63 | + ggplot2 easier to use. In particular, you can now set the `n` parameter |
| 64 | + in `geom_density2d()` without it partially matching `na.rm` (#1485). |
| 65 | + |
| 66 | +* For geoms with both `colour` and `fill`, `alpha` once again only affects |
| 67 | + fill (Reverts #1371, #1523). This was causing problems for people. |
| 68 | + |
| 69 | +* `facet_wrap()`/`facet_grid()` works with multiple empty panels of data |
| 70 | + (#1445). |
| 71 | + |
| 72 | +* `facet_wrap()` correctly swaps `nrow` and `ncol` when facetting vertically |
| 73 | + (#1417). |
| 74 | + |
| 75 | +* `ggsave("x.svg")` now uses svglite to produce the svg (#1432). |
7 | 76 |
|
8 |
| -* `stat-density-2d()` no longer ignores the `h` parameter. |
| 77 | +* `geom_boxplot()` now understands `outlier.color` (#1455). |
9 | 78 |
|
10 |
| -* `stat-density-2d()` now accepts `bins` and `binwidth` parameters |
11 |
| - to control the number of contour levels (#1448, @has2k1). |
| 79 | +* `geom_path()` knows that "solid" (not just 1) represents a solid line (#1534). |
| 80 | + |
| 81 | +* `geom_ribbon()` preserves missing values so they correctly generate a |
| 82 | + gap in the ribbon (#1549). |
| 83 | + |
| 84 | +* `geom_tile()` once again accepts `width` and `height` parameters (#1513). |
| 85 | + It uses `draw_key_polygon()` for better a legend, including a coloured |
| 86 | + outline (#1484). |
| 87 | + |
| 88 | +* `layer()` now automatically adds a `na.rm` parameter if none is explicitly |
| 89 | + supplied. |
| 90 | + |
| 91 | +* `position_jitterdodge()` now works on all possible dodge aesthetics, |
| 92 | + e.g. `color`, `linetype` etc. instead of only based on `fill` (@bleutner) |
| 93 | + |
| 94 | +* `position = "nudge"` now works (although it doesn't do anything useful) |
| 95 | + (#1428). |
| 96 | + |
| 97 | +* The default scale for columns of class "AsIs" is now "identity" (#1518). |
| 98 | + |
| 99 | +* `scale_*_discrete()` has better defaults when used with purely continuous |
| 100 | + data (#1542). |
| 101 | + |
| 102 | +* `scale_size()` warns when used with categorical data. |
| 103 | + |
| 104 | +* `scale_size()`, `scale_colour()`, and `scale_fill()` gain date and date-time |
| 105 | + variants (#1526). |
| 106 | + |
| 107 | +* `stat_bin_hex()` and `stat_bin_summary()` now use the same underlying |
| 108 | + algorithm so results are consistent (#1383). `stat_bin_hex()` now accepts |
| 109 | + a `weight` aesthetic. To be consistent with related stats, the output variable |
| 110 | + from `stat_bin_hex()` is now value instead of count. |
| 111 | + |
| 112 | +* `stat_density()` gains a `bw` parameter which makes it easy to get consistent |
| 113 | + smoothing between facets (@jiho) |
| 114 | + |
| 115 | +* `stat-density-2d()` no longer ignores the `h` parameter, and now accepts |
| 116 | + `bins` and `binwidth` parameters to control the number of contours |
| 117 | + (#1448, @has2k1). |
| 118 | + |
| 119 | +* `stat_ecdf()` does a better job of adding padding to -Inf/Inf, and gains |
| 120 | + an argument `pad` to suppress the padding if not needed (#1467). |
| 121 | + |
| 122 | +* `stat_function()` gains an `xlim` parameter (#1528). It once again works |
| 123 | + with discrete x values (#1509). |
| 124 | + |
| 125 | +* `stat_summary()` preserves sorted x order which avoids artefacts when |
| 126 | + display results with `geom_smooth()` (#1520). |
| 127 | + |
| 128 | +* All elements should now inherit correctly for all themes except `theme_void()`. |
| 129 | + (@Katiedaisey, #1555) |
| 130 | + |
| 131 | +* `theme_void()` was completely void of text but facets and legends still |
| 132 | + need labels. They are now visible (@jiho). |
| 133 | + |
| 134 | +* You can once again set legend key and height width to unit arithmetic |
| 135 | + objects (like `2 * unit(1, "cm")`) (#1437). |
| 136 | + |
| 137 | +* Eliminate spurious warning if you have a layer with no data and no aesthetics |
| 138 | + (#1451). |
| 139 | + |
| 140 | +* Removed a superfluous comma in `theme-defaults.r` code (@jschoeley) |
| 141 | + |
| 142 | +* Fixed a compatibility issue with `ggproto` and R versions prior to 3.1.2. |
| 143 | + (#1444) |
12 | 144 |
|
13 | 145 | # ggplot2 2.0.0
|
14 | 146 |
|
|
0 commit comments