-
Notifications
You must be signed in to change notification settings - Fork 10
/
scale-continuous-npc.r
37 lines (36 loc) · 1.45 KB
/
scale-continuous-npc.r
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#' Position scales for continuous data (npcx & npcy)
#'
#' \code{scale_npcx_continuous()} and \code{scale_npcy_continuous()} are
#' scales for continuous npcx and npcy aesthetics expressed in "npc" units.
#' There are no variants. Obviously limits are always the full range of "npc"
#' units and transformations meaningless. These scales are used by the newly
#' defined aesthetics \code{npcx} and \code{npcy}.
#'
#' @param ... Other arguments passed on to \code{continuous_scale()}
#' @name scale_continuous_npc
#'
#' @return A \code{"Scale"} object.
#'
#' @export
#'
scale_npcx_continuous <- function(...) {
ggplot2::continuous_scale(aesthetics = "npcx",
scale_name = "position_npc", palette = identity, name = NULL, breaks = NULL,
minor_breaks = NULL, labels = NULL, limits = c(NA_real_, NA_real_),
expand = c(0, 0, 0, 0), oob = scales::censor, na.value = NA_real_, trans = "identity",
guide = "none", position = "bottom", super = ggplot2::ScaleContinuousPosition,
...
)
}
#' @rdname scale_continuous_npc
#' @export
scale_npcy_continuous <- function(...) {
ggplot2::continuous_scale(
aesthetics = "npcy",
scale_name = "position_npc", palette = identity, name = NULL, breaks = NULL,
minor_breaks = NULL, labels = NULL, limits = c(NA_real_, NA_real_),
expand = c(0, 0, 0, 0), oob = scales::censor, na.value = NA_real_, trans = "identity",
guide = "none", position = "bottom", super = ggplot2::ScaleContinuousPosition,
...
)
}