Skip to content

Commit daba7ab

Browse files
pkqhadley
authored andcommitted
Apply tidyverse style guide to NEWS.md (#2588)
Includes minor changes throughout to improve alignment to http://style.tidyverse.org/news.html
1 parent a6b77c9 commit daba7ab

File tree

1 file changed

+64
-64
lines changed

1 file changed

+64
-64
lines changed

NEWS.md

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
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
11+
quasiquotation. For instance, you can now supply faceting variables
1212
like this: `facet_wrap(vars(am, cyl))` instead of
1313
`facet_wrap(~am + cyl)`. Note that the formula interface is not going
1414
away and will not be deprecated. `vars()` is simply meant to make it
@@ -35,8 +35,8 @@
3535
ggplot(nc) +
3636
geom_sf(aes(fill = AREA))
3737
```
38-
It supports all simple features, automatically aligns CRS across layer, sets
39-
up correct aspect ratio, and draws a graticule.
38+
It supports all simple features, automatically aligns CRS across layers, sets
39+
up the correct aspect ratio, and draws a graticule.
4040

4141
## New features
4242

@@ -51,13 +51,13 @@
5151
with documentation which hopefully will make this part of ggplot2 less
5252
confusing (#2059).
5353

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

58-
* New `tag` label for adding identification tags to the plot, typically used
59-
for labelling a subplot with a letter. Add a tag with with `labs(tag = "A")`,
60-
style it with the `plot.tag` theme element, and control position with the
58+
* New `tag` label for adding identification tags to plots, typically used for
59+
labelling a subplot with a letter. Add a tag with `labs(tag = "A")`, style it
60+
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
@@ -67,26 +67,26 @@
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

72-
* `position_dodge()` gains an `preserve` argument that allows you to control
72+
* `position_dodge()` gains a `preserve` argument that allows you to control
7373
whether the `total` width at each `x` value is preserved (the current
7474
default), or ensure that the width of a `single` element is preserved
7575
(what many people want) (#1935).
7676

77-
* New `position_dodge2()` provides enhanced dogding for boxplots. Compared to
77+
* New `position_dodge2()` provides enhanced dodging for boxplots. Compared to
7878
`position_dodge()`, `position_dodge2()` compares `xmin` and `xmax` values
79-
to determin which elements overlap, spreading overlapping elements evenly
79+
to determine which elements overlap, and spreads overlapping elements evenly
8080
within the region of overlap. `position_dodge2()` is now the default position
81-
adjustment for `geom_boxplot()`, since it handles `varwidth = TRUE`, and
82-
it will be considered for other geoms in future.
81+
adjustment for `geom_boxplot()`, because it handles `varwidth = TRUE`, and
82+
will be considered for other geoms in the 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
8686
of placement (@karawoo, #2171).
8787

88-
* New `stat_qq_line()` makes it easy to add a simple line to a Q-Q plot. This
89-
line makes it easier to judge the fit of the theoretical distribution
88+
* New `stat_qq_line()` makes it easy to add a simple line to a Q-Q plot, which
89+
makes it easier to judge the fit of the theoretical distribution
9090
(@nicksolomon).
9191

9292
### Scales and guides
@@ -97,17 +97,17 @@
9797

9898
* Improved support for ordered factors. Ordered factors throw a warning when
9999
mapped to shape (unordered factors do not), and do not throw warnings when
100-
mapped to size or alpha (unordered factors do). Viridis is used as default
101-
colour and fill scale for ordered factors (@karawoo, #1526).
100+
mapped to size or alpha (unordered factors do). Viridis is used as the
101+
default colour and fill scale for ordered factors (@karawoo, #1526).
102102

103103
* The `expand` argument of `scale_*_continuous()` and `scale_*_discrete()`
104104
now accepts separate expansion values for the lower and upper range
105105
limits. The expansion limits can be specified using the convenience
106106
function `expand_scale()`.
107107

108108
Separate expansion limits may be useful for bar charts, e.g. if one
109-
wants to have the bottom of the bars being flush with the x axis but
110-
still leave some (automatically calculated amount of) space above them:
109+
wants the bottom of the bars to be flush with the x axis but still
110+
leave some (automatically calculated amount of) space above them:
111111

112112
```r
113113
ggplot(mtcars) +
@@ -117,13 +117,13 @@
117117

118118
It can also be useful for line charts, e.g. for counts over time,
119119
where one wants to have ahardlower limit of y = 0 but leave the
120-
upper limit unspecified (and perhaps differing between panels),
121-
but with some extra space above the highest point on the line.
122-
(With symmetrical limits, the extra space above the highest point
123-
could in some cases cause the lower limit to be negative).
120+
upper limit unspecified (and perhaps differing between panels), with
121+
some extra space above the highest point on the line (with symmetrical
122+
limits, the extra space above the highest point could in some cases
123+
cause the lower limit to be negative).
124124

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

128128
* `scale_colour_continuous()` and `scale_colour_gradient()` are now controlled
129129
by global options `ggplot2.continuous.colour` and `ggplot2.continuous.fill`.
@@ -146,11 +146,12 @@
146146
at all angles (@karawoo).
147147

148148
* Strip labels now understand justification relative to the direction of the
149-
text, meaning that in y facets the strip text can be placed at either end of
149+
text, meaning that in y facets, the strip text can be placed at either end of
150150
the strip using `hjust` (@karawoo).
151151

152-
* Legend titles and labels get a little extra space around them. Legend titles
153-
will no longer overlap the legend at large font sizes (@karawoo, #1881).
152+
* Legend titles and labels get a little extra space around them, which
153+
prevents legend titles from overlapping the legend at large font sizes
154+
(@karawoo, #1881).
154155

155156
## Extension points
156157

@@ -161,12 +162,12 @@
161162
defined for the class of the object (@thomasp85).
162163

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

167168
* Coords have gained new extension mechanisms.
168169

169-
If you have an existing coord extension you will need to revise the
170+
If you have an existing coord extension, you will need to revise the
170171
specification of the `train()` method. It is now called
171172
`setup_panel_params()` (better reflecting what it actually does) and now
172173
has arguments `scale_x`, and `scale_y` (the x and y scales respectively)
@@ -200,12 +201,12 @@
200201
e.g. `as.numeric(scale(x))`.
201202

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

206207
## Minor bug fixes and improvements
207208

208-
### Facetting
209+
### Faceting
209210

210211
* `facet_grid()` gives a more informative error message if you try to use
211212
a variable in both rows and cols (#1928).
@@ -221,64 +222,63 @@
221222

222223
### Scales
223224

224-
* `discrete_scale()` documentation updated to match `continuous_scale()`
225-
(@alistaire47, #2052).
225+
* `discrete_scale()` documentation now inherits shared definitions from
226+
`continuous_scale()` (@alistaire47, #2052).
226227

227-
* `guide_colorbar()` shows all colours of the scale (@has2k1, 2343).
228+
* `guide_colorbar()` shows all colours of the scale (@has2k1, #2343).
228229

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

231-
* Fixed bug in secondary axis that would lead to incorrectly placed ticks with
232-
strong transforms (@thomasp85, #1992).
232+
* Tick marks for secondary axes with strong transformations are more
233+
accurately placed (@thomasp85, #1992).
233234

234235
* Missing line types now reliably generate missing lines (with standard
235236
warning) (#2206).
236237

237-
* Legends no longer try and use set aesthetics that are not length one (#1932).
238+
* Legends now ignore set aesthetics that are length one (#1932).
238239

239240
* All colour and fill scales now have an `aesthetics` argument that can
240241
be used to set the aesthetic(s) the scale works with. This makes it
241242
possible to apply a colour scale to both colour and fill aesthetics
242243
at the same time, via `aesthetics = c("colour", "fill")` (@clauswilke).
243244

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

248-
* Fixed bug in `scale_*_gradient2()` where points outside limits can sometimes
249-
reappear due to rescaling. Now, any rescaling is performed after the limits
250-
are enforced (@foo-bar-baz-qux, #2230).
249+
* `scale_*_gradient2()` now consistently omits points outside limits by
250+
rescaling after the limits are enforced (@foo-bar-baz-qux, #2230).
251251

252252
### Layers
253253

254-
* `geom_label()` no longer produces an undesired border around labels when
255-
`label.size` is 0, even when saving to PDF (@bfgray3, #2407).
254+
* `geom_label()` now correctly produces unbordered labels when `label.size`
255+
is 0, even when saving to PDF (@bfgray3, #2407).
256256

257257
* `layer()` gives considerably better error messages for incorrectly specified
258258
`geom`, `stat`, or `position` (#2401).
259259

260260
* In all layers that use it, `linemitre` now defaults to 10 (instead of 1)
261261
to better match base R.
262262

263-
* `geom_boxplot()` now supplies default value if no `x` aesthetic present
263+
* `geom_boxplot()` now supplies a default value if no `x` aesthetic is present
264264
(@foo-bar-baz-qux, #2110).
265265

266266
* `geom_density()` drops groups with fewer than two data points and throws a
267-
warning. For groups with two data points, the density values are now
268-
calculated with `stats::density` (@karawoo, #2127).
267+
warning. For groups with two data points, density values are now calculated
268+
with `stats::density` (@karawoo, #2127).
269269

270270
* `geom_segment()` now also takes a `linejoin` parameter. This allows more
271271
control over the appearance of the segments, which is especially useful for
272272
plotting thick arrows (@Ax3man, #774).
273273

274274
* `geom_smooth()` now reports the formula used when `method = "auto"`
275-
(@davharris #1951). When mgcv is used, the the `s` in `y ~ s(x, bs = "cs")`
276-
is now fully qualified as `mgcv::s()` to name conflicts (@bfgray3, #2535).
277-
`geom_smooth()` now orders by the `x` aesthetic, making it easier
278-
to pass pre-computed values without manual ordering (@izahn, #2028).
279-
It also now knows it has `ymin` and `ymax` aesthetics (#1939).
280-
The legend correctly reflects the status of the `se` argument when used
281-
with stats other than the default (@clauswilke, #1546).
275+
(@davharris #1951). When mgcv is used, the `s` in `y ~ s(x, bs = "cs")`
276+
is now fully qualified as `mgcv::s()` to avoid name conflicts (@bfgray3,
277+
#2535). `geom_smooth()` now orders by the `x` aesthetic, making it easier
278+
to pass pre-computed values without manual ordering (@izahn, #2028). It
279+
also now knows it has `ymin` and `ymax` aesthetics (#1939). The legend
280+
correctly reflects the status of the `se` argument when used with stats
281+
other than the default (@clauswilke, #1546).
282282

283283
* `geom_tile()` now once again interprets `width` and `height` correctly
284284
(@malcolmbarrett, #2510).
@@ -295,10 +295,10 @@
295295
* `stat_bin()` now accepts functions for `binwidth`. This allows better binning
296296
when faceting along variables with different ranges (@botanize).
297297

298-
* `stat_bin()` / `geom_histogram()` no longer sum incorrectly when using the
299-
`weight` aesthetic (@jiho, #1921).
298+
* `stat_bin()` and `geom_histogram()` now sum correctly when using the `weight`
299+
aesthetic (@jiho, #1921).
300300

301-
* `stat_bin()` uses correct scaling for computed variable `ndensity`
301+
* `stat_bin()` again uses correct scaling for the computed variable `ndensity`
302302
(@timgoodman, #2324).
303303

304304
* `stat_bin()` and `stat_bin_2d()` now properly handle the `breaks` parameter
@@ -310,7 +310,7 @@
310310
* The `show.legend` parameter now accepts a named logical vector to hide/show
311311
only some aesthetics in the legend (@tutuchan, #1798).
312312

313-
* Layers no longer warn about unknown aesthetics with value `NULL` (#1909).
313+
* Layers now silently ignore unknown aesthetics with value `NULL` (#1909).
314314

315315
### Coords
316316

@@ -319,7 +319,7 @@
319319
(@clauswilke, #2536).
320320

321321
* Like scales, coordinate systems now give you a message when you're
322-
replacing an existing coordiante system (#2264).
322+
replacing an existing coordinate system (#2264).
323323
324324
* `coord_polar()` now draws secondary axis ticks and labels
325325
(@dylan-stark, #2072), and can draw the radius axis on the right
@@ -388,8 +388,8 @@
388388

389389
* `ggsave()`'s DPI argument now supports 3 string options: "retina" (320
390390
DPI), "print" (300 DPI), and "screen" (72 DPI) (@foo-bar-baz-qux, #2156).
391-
`ggsave()` no longer partially matches graphic device parameters (#2355),
392-
and correctly restores the previous graphics device when several
391+
`ggsave()` now uses full argument names to avoid partial match warnings
392+
(#2355), and correctly restores the previous graphics device when several
393393
graphics devices are open (#2363).
394394
395395
* `print.ggplot()` now returns the original ggplot object, instead of the
@@ -399,7 +399,7 @@
399399
* `map_data()` now works even when purrr is loaded (tidyverse#66).
400400
401401
* New functions `summarise_layout()`, `summarise_coord()`, and
402-
`summarise_layers()` summarise the layout, coordinate systems, and layers,
402+
`summarise_layers()` summarise the layout, coordinate systems, and layers
403403
of a built ggplot object (#2034, @wch). This provides a tested API that
404404
(e.g.) shiny can depend on.
405405

0 commit comments

Comments
 (0)