File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,19 @@ GeomErrorbar <- ggproto(
18
18
required_aes = c(" x|y" , " ymin|xmin" , " ymax|xmax" ),
19
19
20
20
setup_params = function (data , params ) {
21
- GeomLinerange $ setup_params(data , params )
21
+ params <- GeomLinerange $ setup_params(data , params )
22
+ if (
23
+ isTRUE(params $ flipped_aes ) &&
24
+ isTRUE(" height" %in% names(params )) &&
25
+ ! isTRUE(" width" %in% names(params ))
26
+ ) {
27
+ params <- rename(params , c(height = " width" ))
28
+ cli :: cli_inform(" {.arg height} was translated to {.arg width}." )
29
+ }
30
+ params
22
31
},
23
32
24
- extra_params = c(" na.rm" , " orientation" ),
33
+ extra_params = c(" na.rm" , " orientation" , " height " ),
25
34
26
35
setup_data = function (self , data , params ) {
27
36
data $ flipped_aes <- params $ flipped_aes
You can’t perform that action at this time.
0 commit comments