Skip to content

Commit 7223b58

Browse files
committed
Guide doc tweaks
1 parent 39cb017 commit 7223b58

File tree

7 files changed

+39
-30
lines changed

7 files changed

+39
-30
lines changed

R/axis-secondary.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
#' Secondary axes
1+
#' Specify a secondary axis
22
#'
3-
#' Create a secondary axis as a transformation of the primary axis, positioned
4-
#' opposite of the primary axis.
3+
#' This function is used in conjunction with a position scale to create a
4+
#' secondary axis, positioned opposite of the primary axis. All secondary
5+
#' axes must be based on a one-to-one transformation of the primary axes.
56
#'
67
#' @param trans A transformation formula
78
#'

R/guide-legend.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#' Legend guide.
1+
#' Legend guide
22
#'
33
#' Legend type guide shows key (i.e., geoms) mapped onto values.
44
#' Legend guides for various scales are integrated if possible.

R/guides-.r

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
#' Set guides for each scale.
1+
#' Set guides for each scale
22
#'
3-
#' Guides for each scale can be set in call of \code{scale_*} with argument
4-
#' \code{guide}, or in \code{guides}.
3+
#' Guides for each scale can be set scale-by-scale with the \code{guide}
4+
#' argument, or en masse with \code{guides()}.
55
#'
6-
#' @param ... List of scale guide pairs
6+
#' @param ... List of scale name-guide pairs. The guide can either
7+
#' be a string (i.e. "colorbar" or "legend"), or a call to a guide function
8+
#' (i.e. \code{\link{guide_colourbar}} or \code{\link{guide_legend}})
9+
#' specifying additional arguments.
710
#' @return A list containing the mapping between scale and guide.
811
#' @export
912
#' @family guides

_pkgdown.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,22 @@ reference:
6161
contents:
6262
- labs
6363
- lims
64+
- expand_limits
6465
- starts_with("scale_")
6566

67+
- title: "Guides: axes and legends"
68+
desc: >
69+
The guides (the axes and legends) help readers interpret your plots.
70+
Guides are mostly controlled via the scale (e.g. with the `limits`,
71+
`breaks`, and `labels` arguments), but sometimes you will need additional
72+
cover over the guide apperance. Use `guides()` or the `guide` argument to
73+
individual scales along with `guide_colourbar()` or `guide_legend()`.
74+
contents:
75+
- guide_colourbar
76+
- guide_legend
77+
- guides
78+
- sec_axis
79+
6680
- title: Facetting
6781
desc: >
6882
Facetting generates small multiples, each displaying a different
@@ -94,18 +108,6 @@ reference:
94108
- annotation_map
95109
- annotation_raster
96110

97-
- title: "Guides: axes and legends"
98-
desc: >
99-
The guides (the axes and legends) help readers interpret your plots.
100-
The guide functions give deep control over the details of the apperance.
101-
Override with using `guides()` or the `guide` argument to individual scales.
102-
contents:
103-
- guide_colourbar
104-
- guide_legend
105-
- guides
106-
- expand_limits
107-
- sec_axis
108-
109111
- title: Themes
110112
contents:
111113
- ggtheme
@@ -121,7 +123,7 @@ reference:
121123
- aes_
122124
- print.ggplot
123125

124-
- title: ggproto
126+
- title: Extending ggplot2 with ggproto
125127
contents:
126128
- ggproto
127129
- as.list.ggproto
@@ -152,7 +154,6 @@ reference:
152154
- aes_linetype_size_shape
153155
- aes_position
154156
- borders
155-
- ggplot2-package
156157
- graphical-units
157158
- last_plot
158159
- map_data

man/guide_legend.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/guides.Rd

Lines changed: 7 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/sec_axis.Rd

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)