Skip to content

Commit e36e034

Browse files
committed
replace rd_orientation() with @inheritSection
1 parent 0b49d14 commit e36e034

23 files changed

+159
-66
lines changed

R/geom-bar.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ GeomBar <- ggproto(
6666
#' [position_fill()] shows relative proportions at each `x` by stacking the
6767
#' bars and then standardising each bar to have the same height.
6868
#'
69-
#' @eval rd_orientation()
69+
#' @inheritSection shared_layer_parameters Orientation
7070
#'
7171
#' @aesthetics GeomBar
7272
#' @aesthetics GeomCol

R/geom-boxplot.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#' It visualises five summary statistics (the median, two hinges
55
#' and two whiskers), and all "outlying" points individually.
66
#'
7-
#' @eval rd_orientation()
7+
#' @inheritSection shared_layer_parameters Orientation
88
#'
99
#' @section Summary statistics:
1010
#' The lower and upper hinges correspond to the first and third quartiles

R/geom-density.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ GeomDensity <- ggproto(
2121
#' the histogram. This is a useful alternative to the histogram for continuous
2222
#' data that comes from an underlying smooth distribution.
2323
#'
24-
#' @eval rd_orientation()
24+
#' @inheritSection shared_layer_parameters Orientation
2525
#' @aesthetics GeomDensity
2626
#' @seealso See [geom_histogram()], [geom_freqpoly()] for
2727
#' other methods of displaying continuous distribution.

R/geom-histogram.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#' `scale_x_binned()` with [geom_bar()]. This method by default plots tick marks
2828
#' in between each bar.
2929
#'
30-
#' @eval rd_orientation()
30+
#' @inheritSection shared_layer_parameters Orientation
3131
#'
3232
#' @section Aesthetics:
3333
#' `geom_histogram()` uses the same aesthetics as [geom_bar()];

R/geom-linerange.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ GeomLinerange <- ggproto(
4242
#' Various ways of representing a vertical interval defined by `x`,
4343
#' `ymin` and `ymax`. Each case draws a single graphical object.
4444
#'
45-
#' @eval rd_orientation()
45+
#' @inheritSection shared_layer_parameters Orientation
4646
#'
4747
#' @aesthetics GeomLinerange
4848
#' Note that `geom_pointrange()` also understands `size` for the size of the points.

R/geom-path.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ GeomStep <- ggproto(
178178
#' An alternative parameterisation is [geom_segment()], where each line
179179
#' corresponds to a single case which provides the start and end coordinates.
180180
#'
181-
#' @eval rd_orientation()
181+
#' @inheritSection shared_layer_parameters Orientation
182182
#'
183183
#' @aesthetics GeomPath
184184
#' @inheritParams shared_layer_parameters

R/geom-ribbon.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ GeomArea <- ggproto("GeomArea", GeomRibbon,
241241
#' of x-coordinates. To turn off this interpolation, `stat = "identity"` can
242242
#' be used instead.
243243
#'
244-
#' @eval rd_orientation()
244+
#' @inheritSection shared_layer_parameters Orientation
245245
#'
246246
#' @aesthetics GeomRibbon
247247
#' @seealso

R/geom-smooth.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ GeomSmooth <- ggproto(
7474
#' `glm()`, where the normal confidence band is constructed on the link
7575
#' scale and then back-transformed to the response scale.
7676
#'
77-
#' @eval rd_orientation()
77+
#' @inheritSection shared_layer_parameters Orientation
7878
#'
7979
#' @aesthetics GeomSmooth
8080
#' @inheritParams shared_layer_parameters

R/geom-violin.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#' violin plot is a mirrored density plot displayed in the same way as a
66
#' boxplot.
77
#'
8-
#' @eval rd_orientation()
8+
#' @inheritSection shared_layer_parameters Orientation
99
#'
1010
#' @aesthetics GeomViolin
1111
#' @inheritParams shared_layer_parameters

R/layer.R

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,17 @@
107107
#' can be given explicitly by setting `orientation` to either `"x"` or `"y"`.
108108
#' See the *Orientation* section for more detail.
109109
#'
110+
#' @section Orientation:
111+
#' This geom treats each axis differently and, thus, can thus have two
112+
#' orientations. Often the orientation is easy to deduce from a combination of
113+
#' the given mappings and the types of positional scales in use. Thus, ggplot2
114+
#' will by default try to guess which orientation the layer should have. Under
115+
#' rare circumstances, the orientation is ambiguous and guessing may fail. In
116+
#' that case the orientation can be specified directly using the `orientation`
117+
#' parameter, which can be either `"x"` or `"y"`. The value gives the axis that
118+
#' the geom should run along, `"x"` being the default orientation you would
119+
#' expect for the geom.
120+
#'
110121
#' @keywords internal
111122
#' @aliases NULL
112123
NULL

0 commit comments

Comments
 (0)