You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: R/geom-rug.r
+22-10Lines changed: 22 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,10 @@
4
4
#' with the two 1d marginal distributions. Rug plots display individual
5
5
#' cases so are best used with smaller datasets.
6
6
#'
7
-
#' The rug lines are drawn with a fixed size (3\% of the total plot size) so
8
-
#' are dependent on the overall scale expansion in order not to overplot
9
-
#' existing data.
7
+
#' By default, the rug lines are drawn with a length that corresponds to 3\%
8
+
#' of the total plot size. Since the default scale expansion of for continuous
9
+
#' variables is 5\% at both ends of the scale, the rug will not overlap with
10
+
#' any data points under the default settings.
10
11
#'
11
12
#' @eval rd_aesthetics("geom", "rug")
12
13
#' @inheritParams layer
@@ -15,6 +16,7 @@
15
16
#' It can be set to a string containing any of `"trbl"`, for top, right,
16
17
#' bottom, and left.
17
18
#' @param outside logical that controls whether to move the rug tassels outside of the plot area. Default is off (FALSE). You will also need to use `coord_cartesian(clip = "off")`. When set to TRUE, also consider changing the sides argument to "tr". See examples.
19
+
#' @param length A [grid::unit()] object that sets the length of the rug lines. Use scale expansion to avoid overplotting of data.
0 commit comments