Skip to content

Commit 6195204

Browse files
committed
Doc tweaks for annotations + general reorg
1 parent 7223b58 commit 6195204

13 files changed

+51
-37
lines changed

R/annotation-custom.r

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#' @include geom-.r
22
NULL
33

4-
#' Annotation: Custom grob.
4+
#' Annotation: Custom grob
55
#'
66
#' This is a special geom intended for use as static annotations
77
#' that are the same in every panel. These annotations will not
88
#' affect scales (i.e. the x and y axes will not grow to cover the range
9-
#' of the grob, and the grob will not be modified by any ggplot settings or mappings).
9+
#' of the grob, and the grob will not be modified by any ggplot settings
10+
#' or mappings).
1011
#'
1112
#' Most useful for adding tables, inset plots, and other grid-based decorations.
1213
#'

R/annotation-map.r

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#' @include geom-map.r
22
NULL
33

4-
#' Annotation: maps.
4+
#' Annotation: a maps
5+
#'
6+
#' Display a fixed map on a plot.
57
#'
68
#' @param map data frame representing a map. Most map objects can be
79
#' converted into the right format by using \code{\link{fortify}}

R/annotation-raster.r

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
#' @include geom-raster.r
33
NULL
44

5-
#' Annotation: High-performance rectangular tiling.
5+
#' Annotation: high-performance rectangular tiling
66
#'
77
#' This is a special version of \code{\link{geom_raster}} optimised for static
88
#' annotations that are the same in every panel. These annotations will not
99
#' affect scales (i.e. the x and y axes will not grow to cover the range
10-
#' of the raster, and the raster must already have its own colours).
11-
#'
12-
#' Most useful for adding bitmap images.
10+
#' of the raster, and the raster must already have its own colours). This
11+
#' is useful for adding bitmap images.
1312
#'
1413
#' @param raster raster object to display
1514
#' @param xmin,xmax x location (in data coordinates) giving horizontal

R/annotation.r

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#' Create an annotation layer.
1+
#' Create an annotation layer
22
#'
3-
#' This function adds geoms to a plot. Unlike typical a geom function,
3+
#' This function adds geoms to a plot, but unlike typical a geom function,
44
#' the properties of the geoms are not mapped from variables of a data frame,
55
#' but are instead passed in as vectors. This is useful for adding small annotations
66
#' (such as text labels) or if you have your data in vectors, and for some

R/fortify-map.r

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@ map_data <- function(map, region = ".", exact = FALSE, ...) {
6868
fortify(map(map, region, exact = exact, plot = FALSE, fill = TRUE, ...))
6969
}
7070

71-
#' Create a layer of map borders.
71+
#' Create a layer of map borders
72+
#'
73+
#' This is a quick and dirty way to get map data (from the maps package)
74+
#' on to your plot. This is a good place to start if you need some crude
75+
#' reference lines, but you'll typically want something more sophisticated
76+
#' for communication graphics.
7277
#'
7378
#' @param database map data, see \code{\link[maps]{map}} for details
7479
#' @param regions map region

R/plot-last.r

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ set_last_plot <- function(value) .store$set(value)
1616
#'
1717
#' @seealso \code{\link{ggsave}}
1818
#' @export
19+
#' @keywords internal
1920
last_plot <- function() .store$get()

_pkgdown.yml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,19 @@ reference:
5151
contents:
5252
- starts_with("position_")
5353

54+
- title: "Layer: annotations"
55+
desc: >
56+
Annotation are special types of layer than don't inherit global settings
57+
from the plot. Rhey are used to add fixed reference data to plot.
58+
contents:
59+
- geom_abline
60+
- annotate
61+
- annotation_custom
62+
- annotation_logticks
63+
- annotation_map
64+
- annotation_raster
65+
- borders
66+
5467
- title: Scales
5568
desc: >
5669
Scales control the details of how data values are translated to visual
@@ -100,14 +113,6 @@ reference:
100113
contents:
101114
- starts_with("coord_")
102115

103-
- title: Annotations
104-
contents:
105-
- annotate
106-
- annotation_custom
107-
- annotation_logticks
108-
- annotation_map
109-
- annotation_raster
110-
111116
- title: Themes
112117
contents:
113118
- ggtheme
@@ -117,6 +122,8 @@ reference:
117122
- rel
118123
- is.rel
119124
- is.theme
125+
- margin
126+
- graphical-units
120127

121128
- title: Programming with ggplot2
122129
contents:
@@ -139,12 +146,14 @@ reference:
139146
- fortify.map
140147
- fortify
141148
- fortify.sp
149+
- map_data
142150

143151
- title: Vector helpers
144152
contents:
145153
- cut_interval
146154
- hmisc
147155
- mean_se
156+
- resolution
148157

149158
- title: All functions
150159
desc: ~
@@ -153,12 +162,6 @@ reference:
153162
- aes_group_order
154163
- aes_linetype_size_shape
155164
- aes_position
156-
- borders
157-
- graphical-units
158-
- last_plot
159-
- map_data
160-
- margin
161-
- resolution
162165
- translate_qplot_ggplot
163166
- translate_qplot_lattice
164167
- qplot

man/annotate.Rd

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

man/annotation_custom.Rd

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

man/annotation_map.Rd

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

0 commit comments

Comments
 (0)