Skip to content

Commit 0b71743

Browse files
batpigandmehadley
authored andcommitted
Copy edit NEWS.md (#2571)
* sf section now has a bullet, so that it's inline with everything else * minor typo fixes * consistent period at the end of each item AFTER (@author)
1 parent b071629 commit 0b71743

File tree

1 file changed

+77
-75
lines changed

1 file changed

+77
-75
lines changed

NEWS.md

Lines changed: 77 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -8,66 +8,66 @@
88

99
* `facet_wrap()` and `facet_grid()` now support `vars()` inputs. Like
1010
`dplyr::vars()`, this helper quotes its inputs and supports
11-
quasiquotation. For instance you can now supply facetting variables
12-
like this: `facet_wrap(vars(am, cyl))` instead of `facet_wrap(~am +
13-
cyl)`. Note that the formula interface is not going away and will
14-
not be deprecated. `vars()` is simply meant to make it easier to
15-
create functions around `facet_wrap()` and `facet_grid()`.
11+
quasiquotation. For instance, you can now supply facetting variables
12+
like this: `facet_wrap(vars(am, cyl))` instead of
13+
`facet_wrap(~am + cyl)`. Note that the formula interface is not going
14+
away and will not be deprecated. `vars()` is simply meant to make it
15+
easier to create functions around `facet_wrap()` and `facet_grid()`.
1616

1717
The first two arguments of `facet_grid()` become `rows` and `cols`
1818
and now support `vars()` inputs. Note however that we took special
1919
care to ensure complete backward compatibility. With this change
2020
`facet_grid(vars(cyl), vars(am, vs))` is equivalent to
21-
`facet_grid(cyl ~ am + vs)` and `facet_grid(cols = vars(am, vs))` is
21+
`facet_grid(cyl ~ am + vs)`, and `facet_grid(cols = vars(am, vs))` is
2222
equivalent to `facet_grid(. ~ am + vs)`.
2323

2424
One nice aspect of the new interface is that you can now easily
2525
supply names: `facet_grid(vars(Cylinder = cyl), labeller =
26-
label_both)` will give nice label titles to the facets. Of course
26+
label_both)` will give nice label titles to the facets. Of course,
2727
those names can be unquoted with the usual tidy eval syntax.
2828

2929
### sf
3030

31-
ggplot2 now has full support for sf with `geom_sf()` and `coord_sf()`:
31+
* ggplot2 now has full support for sf with `geom_sf()` and `coord_sf()`:
3232

33-
```R
34-
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
35-
ggplot(nc) +
36-
geom_sf(aes(fill = AREA))
37-
```
38-
It supports all simple features, automatically aligns CRS across layer, sets
39-
up correct aspect ratio, and draws a graticule.
33+
```r
34+
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
35+
ggplot(nc) +
36+
geom_sf(aes(fill = AREA))
37+
```
38+
It supports all simple features, automatically aligns CRS across layer, sets
39+
up correct aspect ratio, and draws a graticule.
4040

4141
## New features
4242

4343
* ggplot2 now works on R 3.1 onwards, and uses the
4444
[vdiffr](https://github.com/lionel-/vdiffr) package for visual testing.
4545

46-
* In most cases, accidentally `%>%` instead of `+` will generate an informative
47-
error (#2400).
46+
* In most cases, accidentally using `%>%` instead of `+` will generate an
47+
informative error (#2400).
4848

4949
* New syntax for calculated aesthetics. Instead of using `aes(y = ..count..)`
5050
you can (and should!) use `aes(y = calc(count))`. `calc()` is a real function
5151
with documentation which hopefully will make this part of ggplot2 less
52-
confusing. (#2059)
52+
confusing (#2059).
5353

54-
`calc()` is particularly nice if for more complex calculation because you
54+
`calc()` is particularly nice for more complex calculation because you
5555
only need to specify once: `aes(y = calc(count / max(count)))`,
5656
rather than `aes(y = ..count.. / max(..count..))`
5757

5858
* New `tag` label for adding identification tags to the plot, typically used
5959
for labelling a subplot with a letter. Add a tag with with `labs(tag = "A")`,
60-
style with the the `plot.tag` theme element, and control position with
60+
style it with the `plot.tag` theme element, and control position with the
6161
`plot.tag.position` theme setting (@thomasp85).
6262

6363
### Layers: geoms, stats, and position adjustments
6464

6565
* `geom_segment()` and `geom_curve()` have a new `arrow.fill` parameter which
66-
allows you to specify a separate fill colour for closed arrowheads.
66+
allows you to specify a separate fill colour for closed arrowheads
6767
(@hrbrmstr and @clauswilke, #2375).
6868

6969
* `geom_point()` and friends can now take shapes as strings instead of integers,
70-
e.g. `geom_point(shape = "diamond")`. (@daniel-barnett, #2075).
70+
e.g. `geom_point(shape = "diamond")` (@daniel-barnett, #2075).
7171

7272
* `position_dodge()` gains an `preserve` argument that allows you to control
7373
whether the `total` width at each `x` value is preserved (the current
@@ -76,10 +76,10 @@ up correct aspect ratio, and draws a graticule.
7676

7777
* New `position_dodge2()` provides enhanced dogding for boxplots. Compared to
7878
`position_dodge()`, `position_dodge2()` compares `xmin` and `xmax` values
79-
to determin which elements overlap, and spreading overlapping elements evenly
79+
to determin which elements overlap, spreading overlapping elements evenly
8080
within the region of overlap. `position_dodge2()` is now the default position
8181
adjustment for `geom_boxplot()`, since it handles `varwidth = TRUE`, and
82-
it will be considered for other geoms in future
82+
it will be considered for other geoms in future.
8383

8484
The `padding` parameter adds a small amount of padding between elements
8585
(@karawoo, #2143) and a `reverse` parameter allows you to reverse the order
@@ -109,7 +109,7 @@ up correct aspect ratio, and draws a graticule.
109109
wants to have the bottom of the bars being flush with the x axis but
110110
still leave some (automatically calculated amount of) space above them:
111111

112-
```R
112+
```r
113113
ggplot(mtcars) +
114114
geom_bar(aes(x = factor(cyl))) +
115115
scale_y_continuous(expand = expand_scale(mult = c(0, .1)))
@@ -120,9 +120,9 @@ up correct aspect ratio, and draws a graticule.
120120
upper limit unspecified (and perhaps differing between panels),
121121
but with some extra space above the highest point on the line.
122122
(With symmetrical limits, the extra space above the highest point
123-
could in some cases cause the lower limit to be negative.)
123+
could in some cases cause the lower limit to be negative).
124124

125-
The old syntax for the `expand` argument will of course continue
125+
The old syntax for the `expand` argument will, of course, continue
126126
to work. (@huftis, #1669)
127127

128128
* `scale_colour_continuous()` and `scale_colour_gradient()` are now controlled
@@ -131,7 +131,7 @@ up correct aspect ratio, and draws a graticule.
131131

132132
* New `scale_colour_viridis_c()`/`scale_fill_viridis_c()` (continuous) and
133133
`scale_colour_viridis_d()`/`scale_fill_viridis_d()` (discrete) make it
134-
easy to use Viridis colour scales. (@karawoo, #1526).
134+
easy to use Viridis colour scales (@karawoo, #1526).
135135

136136
* Guides for `geom_text()` now accept custom labels with
137137
`guide_legend(override.aes = list(label = "foo"))` (@brianwdavis, #2458).
@@ -161,24 +161,25 @@ up correct aspect ratio, and draws a graticule.
161161
defined for the class of the object (@thomasp85).
162162

163163
* Theme elements can now be subclassed. Add a `merge_element` method to control
164-
how properties are inherited from parent element. Add `element_grob` method
165-
to define how elements are rendered into grobs (@thomasp85, #1981).
164+
how properties are inherited from parent element. Add an `element_grob`
165+
method to define how elements are rendered into grobs (@thomasp85, #1981).
166166

167167
* Coords have gained new extension mechanisms.
168168

169169
If you have an existing coord extension you will need to revise the
170-
specification of the `train()` method. It is now called `setup_panel_params()`
171-
(better reflecting what it actually does) and now has arguments
172-
`scale_x`, and `scale_y` (the x and y scales respectively) and
173-
`param`, a list of plot specific parameters generated by `setup_params()`.
170+
specification of the `train()` method. It is now called
171+
`setup_panel_params()` (better reflecting what it actually does) and now
172+
has arguments `scale_x`, and `scale_y` (the x and y scales respectively)
173+
and `param`, a list of plot specific parameters generated by
174+
`setup_params()`.
174175

175176
What was formerly called `scale_details` (in coords), `panel_ranges`
176177
(in layout) and `panel_scales` (in geoms) are now consistently called
177-
`panel_params` (#1311). These are parameters of the Coord that vary from
178+
`panel_params` (#1311). These are parameters of the coord that vary from
178179
panel to panel.
179180

180-
* `ggplot_build()` and `ggplot_gtable()` are now generics so ggplot-subclasses can
181-
define additional behavior during the build stage.
181+
* `ggplot_build()` and `ggplot_gtable()` are now generics, so ggplot-subclasses
182+
can define additional behavior during the build stage.
182183

183184
* `guide_train()`, `guide_merge()`, `guide_geom()`, and `guide_gengrob()`
184185
are now exported as they are needed if you want to design your own guide.
@@ -195,24 +196,24 @@ up correct aspect ratio, and draws a graticule.
195196
convert a list into a data frame. This improves ggplot2's support for
196197
list-columns (needed for sf support), at a small cost: you can no longer
197198
use matrix-columns. These are rarely used but are produced by `scale()`;
198-
to continue use `scale()` you'll need to wrap it with `as.numeric()`,
199+
to continue to use `scale()` you'll need to wrap it with `as.numeric()`,
199200
e.g. `as.numeric(scale(x))`.
200201

201202
* The function `guide_train()` now has an optional parameter `aesthetic`
202203
that allows to override the `aesthetic` setting in the scale. This change
203-
will only affect code that implements custom guides. (@clauswilke)
204+
will only affect code that implements custom guides (@clauswilke).
204205

205206
## Minor bug fixes and improvements
206207

207208
### Facetting
208209

209210
* `facet_grid()` gives a more informative error message if you try to use
210-
a variable in both rows and cols (#1928)
211+
a variable in both rows and cols (#1928).
211212

212213
* `facet_grid()` and `facet_wrap()` both give better error messages if you
213-
attempt to use an unsupported coord with free scales (#2049)
214+
attempt to use an unsupported coord with free scales (#2049).
214215

215-
* `label_parsed()` works once again (#2279)
216+
* `label_parsed()` works once again (#2279).
216217

217218
* You can now style the background of horizontal and vertical strips
218219
independently with `strip.background.x` and `strip.background.y`
@@ -227,7 +228,7 @@ up correct aspect ratio, and draws a graticule.
227228

228229
* `scale_identity()` once again produces legends by default (#2112).
229230

230-
* Fix bug in secondary axis that would lead to incorrectly placed ticks with
231+
* Fixed bug in secondary axis that would lead to incorrectly placed ticks with
231232
strong transforms (@thomasp85, #1992).
232233

233234
* Missing line types now reliably generate missing lines (with standard
@@ -238,13 +239,13 @@ up correct aspect ratio, and draws a graticule.
238239
* All colour and fill scales now have an `aesthetics` argument that can
239240
be used to set the aesthetic(s) the scale works with. This makes it
240241
possible to apply a colour scale to both colour and fill aesthetics
241-
at the same time, via `aesthetics = c("colour", "fill"). (@clauswilke)
242+
at the same time, via `aesthetics = c("colour", "fill")` (@clauswilke).
242243

243244
* Three generic scales were added that work with any aesthetic or set of
244-
aesthetics: `scale_continuous_identity()`, `scale_discrete_identity()`,
245-
`scale_discrete_manual()`. (@clauswilke)
245+
aesthetics: `scale_continuous_identity()`, `scale_discrete_identity()`, and
246+
`scale_discrete_manual()` (@clauswilke).
246247

247-
* Fix bug in `scale_*_gradient2()` where points outside limits can sometimes
248+
* Fixed bug in `scale_*_gradient2()` where points outside limits can sometimes
248249
reappear due to rescaling. Now, any rescaling is performed after the limits
249250
are enforced (@foo-bar-baz-qux, #2230).
250251

@@ -280,44 +281,45 @@ up correct aspect ratio, and draws a graticule.
280281
with stats other than the default (@clauswilke, #1546).
281282

282283
* `geom_tile()` now once again interprets `width` and `height` correctly
283-
(@malcolmbarrett, #2510)
284+
(@malcolmbarrett, #2510).
284285

285286
* `position_jitter()` and `position_jitterdodge()` gain a `seed` argument that
286-
allows specifying a random seed for reproducible jittering (@krlmlr, #1996
287-
and @slowkow, #2445).
287+
allows the specification of a random seed for reproducible jittering
288+
(@krlmlr, #1996 and @slowkow, #2445).
288289

289290
* `stat_density()` has better behaviour if all groups are dropped because they
290291
are too small (#2282).
291292

292-
* `stat_summary_bin()` now understands the `breaks` parameter (@karawoo, #2214)
293+
* `stat_summary_bin()` now understands the `breaks` parameter (@karawoo, #2214).
293294

294295
* `stat_bin()` now accepts functions for `binwidth`. This allows better binning
295296
when faceting along variables with different ranges (@botanize).
296297

297298
* `stat_bin()` / `geom_histogram()` no longer sum incorrectly when using the
298299
`weight` aesthetic (@jiho, #1921).
299300

300-
* `stat_bin()` uses correct scaling for computed variable `ndensity` (@timgoodman, #2324)
301+
* `stat_bin()` uses correct scaling for computed variable `ndensity`
302+
(@timgoodman, #2324).
301303

302-
* `stat_bin()` and `stat_bin_2d()` now properly handle the `breaks` parameter when
303-
the scales are transformed (@has2k1, #2366).
304+
* `stat_bin()` and `stat_bin_2d()` now properly handle the `breaks` parameter
305+
when the scales are transformed (@has2k1, #2366).
304306

305307
* `update_geom_defaults()` and `update_stat_defaults()` allow American
306308
spelling of aesthetic parameters (@foo-bar-baz-qux, #2299).
307309

308310
* The `show.legend` parameter now accepts a named logical vector to hide/show
309-
only some aesthetics in the legend (@tutuchan, #1798)
311+
only some aesthetics in the legend (@tutuchan, #1798).
310312

311313
* Layers no longer warn about unknown aesthetics with value `NULL` (#1909).
312314

313315
### Coords
314316

315317
* Clipping to the plot panel is now configurable, through a `clip` argument
316-
to coordinate systems, e.g. `coord_cartesian(clip = "off")`.
317-
(@clauswilke, #2536)
318+
to coordinate systems, e.g. `coord_cartesian(clip = "off")`
319+
(@clauswilke, #2536).
318320

319321
* Like scales, coordinate systems now give you a message when you're
320-
replacing an existing coordiante system (#2264)
322+
replacing an existing coordiante system (#2264).
321323
322324
* `coord_polar()` now draws secondary axis ticks and labels
323325
(@dylan-stark, #2072), and can draw the radius axis on the right
@@ -329,7 +331,7 @@ up correct aspect ratio, and draws a graticule.
329331
### Themes
330332
331333
* Complete themes now always override all elements of the default theme
332-
(@has2k1, #2058, #2079)
334+
(@has2k1, #2058, #2079).
333335
334336
* Themes now set default grid colour in `panel.grid` rather than individually
335337
in `panel.grid.major` and `panel.grid.minor` individually. This makes it
@@ -338,43 +340,43 @@ up correct aspect ratio, and draws a graticule.
338340
* Fixed bug when setting strips to `element_blank()` (@thomasp85).
339341
340342
* Axes positioned on the top and to the right can now customize their ticks and
341-
lines separately (@thomasp85, #1899)
343+
lines separately (@thomasp85, #1899).
342344
343345
* Built-in themes gain parameters `base_line_size` and `base_rect_size` which
344346
control the default sizes of line and rectangle elements (@karawoo, #2176).
345347
346348
* Default themes use `rel()` to set line widths (@baptiste).
347349
348-
* Themes were tweaked for visual consistency and more graceful behavior when changing
349-
the base font size. All absolute heights or widths were replaced with heights or
350-
widths that are proportional to the base font size. One relative font size
351-
was eliminated. (@clauswilke)
350+
* Themes were tweaked for visual consistency and more graceful behavior when
351+
changing the base font size. All absolute heights or widths were replaced
352+
with heights or widths that are proportional to the base font size. One
353+
relative font size was eliminated (@clauswilke).
352354
353355
* The height of descenders is now calculated solely on font metrics and doesn't
354356
change with the specific letters in the string. This fixes minor alignment
355-
issues with plot titles, subtitles, and legend titles. (#2288, @clauswilke)
357+
issues with plot titles, subtitles, and legend titles (#2288, @clauswilke).
356358

357359
### Guides
358360

359361
* `guide_colorbar()` is more configurable: tick marks and color bar frame
360362
can now by styled with arguments `ticks.colour`, `ticks.linewidth`,
361-
`frame.colour`, `frame.linewidth`, and `frame.linetype`.
362-
(@clauswilke)
363+
`frame.colour`, `frame.linewidth`, and `frame.linetype`
364+
(@clauswilke).
363365

364366
* `guide_colorbar()` now uses `legend.spacing.x` and `legend.spacing.y`
365367
correctly, and it can handle multi-line titles. Minor tweaks were made to
366368
`guide_legend()` to make sure the two legend functions behave as similarly as
367-
possible. (@clauswilke, #2397 and #2398)
369+
possible (@clauswilke, #2397 and #2398).
368370

369371
* The theme elements `legend.title` and `legend.text` now respect the settings
370-
of `margin`, `hjust`, and `vjust`. (@clauswilke, #2465, #1502)
372+
of `margin`, `hjust`, and `vjust` (@clauswilke, #2465, #1502).
371373

372374
* Non-angle parameters of `label.theme` or `title.theme` can now be set in
373-
`guide_legend()` and `guide_colorbar()`. (@clauswilke, #2544)
375+
`guide_legend()` and `guide_colorbar()` (@clauswilke, #2544).
374376

375377
### Other
376378

377-
* `fortify()` gains a method for tbls (@karawoo, #2218)
379+
* `fortify()` gains a method for tbls (@karawoo, #2218).
378380

379381
* `ggplot` gains a method for `grouped_df`s that adds a `.group` variable,
380382
which computes a unique value for each group. Use it with
@@ -388,20 +390,20 @@ up correct aspect ratio, and draws a graticule.
388390
DPI), "print" (300 DPI), and "screen" (72 DPI) (@foo-bar-baz-qux, #2156).
389391
`ggsave()` no longer partially matches graphic device parameters (#2355),
390392
and correctly restores the previous graphics device when several
391-
graphics devices are open. (#2363)
393+
graphics devices are open (#2363).
392394
393395
* `print.ggplot()` now returns the original ggplot object, instead of the
394396
output from `ggplot_build()`. Also, the object returned from
395-
`ggplot_build()` now has the class `"ggplot_built"`. (#2034)
397+
`ggplot_build()` now has the class `"ggplot_built"` (#2034).
396398
397-
* `map_data()` now works even when purrr is loaded (tidyverse#66)
399+
* `map_data()` now works even when purrr is loaded (tidyverse#66).
398400
399401
* New functions `summarise_layout()`, `summarise_coord()`, and
400402
`summarise_layers()` summarise the layout, coordinate systems, and layers,
401403
of a built ggplot object (#2034, @wch). This provides a tested API that
402404
(e.g.) shiny can depend on.
403405
404-
* Update startup messages to reflect new resources. (#2410, @mine-cetinkaya-rundel)
406+
* Updated startup messages reflect new resources (#2410, @mine-cetinkaya-rundel).
405407
406408
# ggplot2 2.2.1
407409

0 commit comments

Comments
 (0)