-
Notifications
You must be signed in to change notification settings - Fork 2k
/
Copy pathzxx.r
165 lines (142 loc) · 3.64 KB
/
zxx.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# Default scales -------------------------------------------------------------
#' @export
#' @rdname scale_hue
#' @usage NULL
scale_colour_discrete <- scale_colour_hue
#' @export
#' @rdname scale_viridis
#' @usage NULL
scale_colour_ordinal <- scale_colour_viridis_d
#' @export
#' @rdname scale_gradient
#' @usage NULL
scale_colour_datetime <- function(...,
low = "#132B43",
high = "#56B1F7",
space = "Lab",
na.value = "grey50",
guide = "colourbar") {
datetime_scale(
"colour",
"time",
palette = seq_gradient_pal(low, high, space),
na.value = na.value,
guide = guide,
...
)
}
#' @export
#' @rdname scale_gradient
#' @usage NULL
scale_colour_date <- function(...,
low = "#132B43",
high = "#56B1F7",
space = "Lab",
na.value = "grey50",
guide = "colourbar") {
datetime_scale(
"colour",
"date",
palette = seq_gradient_pal(low, high, space),
na.value = na.value,
guide = guide,
...
)
}
#' @export
#' @rdname scale_hue
#' @usage NULL
scale_fill_discrete <- scale_fill_hue
#' @export
#' @rdname scale_viridis
#' @usage NULL
scale_fill_ordinal <- scale_fill_viridis_d
#' @export
#' @rdname scale_gradient
#' @usage NULL
scale_fill_datetime <- function(...,
low = "#132B43",
high = "#56B1F7",
space = "Lab",
na.value = "grey50",
guide = "colourbar") {
datetime_scale(
"fill",
"time",
palette = seq_gradient_pal(low, high, space),
na.value = na.value,
guide = guide,
...
)
}
#' @export
#' @rdname scale_gradient
#' @usage NULL
scale_fill_date <- function(...,
low = "#132B43",
high = "#56B1F7",
space = "Lab",
na.value = "grey50",
guide = "colourbar") {
datetime_scale(
"fill",
"date",
palette = seq_gradient_pal(low, high, space),
na.value = na.value,
guide = guide,
...
)
}
# British to American spellings ----------------------------------------------
#' @export
#' @rdname scale_brewer
#' @usage NULL
scale_color_brewer <- scale_colour_brewer
#' @export
#' @rdname scale_brewer
#' @usage NULL
scale_color_distiller <- scale_colour_distiller
#' @export
#' @rdname scale_gradient
#' @usage NULL
scale_color_continuous <- scale_colour_gradient
#' @export
#' @rdname scale_hue
#' @usage NULL
scale_color_discrete <- scale_colour_hue
#' @export
#' @rdname scale_gradient
#' @usage NULL
scale_color_gradient <- scale_colour_gradient
#' @export
#' @rdname scale_gradient
#' @usage NULL
scale_color_gradient2 <- scale_colour_gradient2
#' @export
#' @rdname scale_gradient
#' @usage NULL
scale_color_gradientn <- scale_colour_gradientn
#' @export
#' @rdname scale_grey
#' @usage NULL
scale_color_grey <- scale_colour_grey
#' @export
#' @rdname scale_hue
#' @usage NULL
scale_color_hue <- scale_colour_hue
#' @export
#' @rdname scale_identity
#' @usage NULL
scale_color_identity <- scale_colour_identity
#' @export
#' @rdname scale_manual
#' @usage NULL
scale_color_manual <- scale_colour_manual
#' @export
#' @rdname scale_viridis
#' @usage NULL
scale_color_viridis_d <- scale_colour_viridis_d
#' @export
#' @rdname scale_viridis
#' @usage NULL
scale_color_viridis_c <- scale_colour_viridis_c