@@ -146,13 +146,7 @@ guide_colourbar <- function(
146
146
147
147
theme <- deprecated_guide_args(theme , ... )
148
148
if (! is.null(position )) {
149
- if (is.numeric(position )) {
150
- if (length(position ) != 2L ) {
151
- cli :: cli_abort(" {.arg position} must be a numeric of length 2" )
152
- }
153
- } else {
154
- position <- arg_match0(position , c(.trbl , " inside" ))
155
- }
149
+ position <- arg_match0(position , c(.trbl , " inside" ))
156
150
}
157
151
check_number_decimal(alpha , min = 0 , max = 1 , allow_na = TRUE )
158
152
@@ -218,20 +212,19 @@ GuideColourbar <- ggproto(
218
212
hashables = exprs(title , key $ .label , decor , name ),
219
213
220
214
elements = list (
221
- background = " legend.background" ,
222
- margin = " legend.margin" ,
223
- key = " legend.key" ,
224
- key_height = " legend.key.height" ,
225
- key_width = " legend.key.width" ,
226
- text = " legend.text" ,
227
- theme.title = " legend.title" ,
228
- text_position = " legend.text.position" ,
229
- title_position = " legend.title.position" ,
230
- axis_line = " legend.axis.line" ,
231
- ticks = " legend.ticks" ,
232
- ticks_length = " legend.ticks.length" ,
233
- frame = " legend.frame" ,
234
- inside_position = " legend.position.inside"
215
+ background = " legend.background" ,
216
+ margin = " legend.margin" ,
217
+ key = " legend.key" ,
218
+ key_height = " legend.key.height" ,
219
+ key_width = " legend.key.width" ,
220
+ text = " legend.text" ,
221
+ theme.title = " legend.title" ,
222
+ text_position = " legend.text.position" ,
223
+ title_position = " legend.title.position" ,
224
+ axis_line = " legend.axis.line" ,
225
+ ticks = " legend.ticks" ,
226
+ ticks_length = " legend.ticks.length" ,
227
+ frame = " legend.frame"
235
228
),
236
229
237
230
extract_key = function (scale , aesthetic , ... ) {
0 commit comments