Skip to content

Commit 38237d0

Browse files
committed
Merge pull request #1460 from tonytonov/master
Minor fixes in vignettes
2 parents 88b1451 + a92d419 commit 38237d0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

vignettes/extending-ggplot2.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ ggplot(mpg, aes(displ, hwy)) +
177177
stat_lm(formula = y ~ poly(x, 10), geom = "point", colour = "red", n = 20)
178178
```
179179

180-
Note that don't _have_ to explicitly include the new parameters in the arguments for the layer, `...` will get passed to the right place anyway. But you'll need to document them somewhere so the user knows about them. Here's a brief example. Note `@inheritParams ggplot2::stat_identity`: that will automatically inherit documentation for all the parameters also defined for `stat_identity()`.
180+
Note that we don't _have_ to explicitly include the new parameters in the arguments for the layer, `...` will get passed to the right place anyway. But you'll need to document them somewhere so the user knows about them. Here's a brief example. Note `@inheritParams ggplot2::stat_identity`: that will automatically inherit documentation for all the parameters also defined for `stat_identity()`.
181181

182182
```{r}
183183
#' @inheritParams ggplot2::stat_identity
@@ -199,7 +199,7 @@ stat_lm <- function(mapping = NULL, data = NULL, geom = "line",
199199

200200
### Picking defaults
201201

202-
Sometimes you have calculations that should performed once for the complete dataset, not once for each group. This is useful for picking sensible default values. For example, if we want to do a density estimate, it's reasonable to pick one bandwidth for the whole plot. The following Stat creates a variation of the `stat_density()` that picks one bandwidth for all groups by choosing the mean of the "best" bandwidth for each group (I have no theoretical justification for this, but it doesn't seem unreasonable).
202+
Sometimes you have calculations that should be performed once for the complete dataset, not once for each group. This is useful for picking sensible default values. For example, if we want to do a density estimate, it's reasonable to pick one bandwidth for the whole plot. The following Stat creates a variation of the `stat_density()` that picks one bandwidth for all groups by choosing the mean of the "best" bandwidth for each group (I have no theoretical justification for this, but it doesn't seem unreasonable).
203203

204204
To do this we override the `setup_params()` method. It's passed the data and a list of params, and returns an updated list.
205205

vignettes/ggplot2-specs.Rmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ Colours can be specified with:
3030
in the range `00` to `FF`
3131

3232
You can optionally make the colour transparent by using the form
33-
`"#RRGGBBAA".
33+
`"#RRGGBBAA"`.
3434

3535
* An __NA__, for a completely transparent colour.
3636

37-
* The [munsell](https://github.com/cwickham/munsell) package, Charlotte
37+
* The [munsell](https://github.com/cwickham/munsell) package, by Charlotte
3838
Wickham, provides a wrapper around the colour system designed by Alfred
3939
Munsell.
4040

@@ -61,7 +61,7 @@ Line types can be specified with:
6161
```
6262
6363
* The lengths of on/off stretches of line. This is done with a string
64-
containing 2, 4, 6, or 8 hexadecimal digits which give the lengths of c
64+
containing 2, 4, 6, or 8 hexadecimal digits which give the lengths of
6565
consecutive lengths. For example, the string `"33"` specifies three units
6666
on followed by three off and `"3313"` specifies three units on followed by
6767
three off followed by one on and finally three off.

0 commit comments

Comments
 (0)