@@ -31,47 +31,5 @@ geom_col <- function(mapping = NULL, data = NULL,
3131# ' @usage NULL
3232# ' @export
3333# ' @include geom-rect.r
34- GeomCol <- ggproto(" GeomCol" , GeomRect ,
35- required_aes = c(" x" , " y" ),
36-
37- # These aes columns are created by setup_data(). They need to be listed here so
38- # that GeomRect$handle_na() properly removes any bars that fall outside the defined
39- # limits, not just those for which x and y are outside the limits
40- non_missing_aes = c(" xmin" , " xmax" , " ymin" , " ymax" ),
41-
42- setup_params = function (data , params ) {
43- params $ flipped_aes <- has_flipped_aes(data , params )
44- params
45- },
46-
47- extra_params = c(" just" , " na.rm" , " orientation" ),
48-
49- setup_data = function (data , params ) {
50- data $ flipped_aes <- params $ flipped_aes
51- data <- flip_data(data , params $ flipped_aes )
52- data $ width <- data $ width %|| %
53- params $ width %|| % (resolution(data $ x , FALSE ) * 0.9 )
54- data $ just <- params $ just %|| % 0.5
55- data <- transform(
56- data ,
57- ymin = pmin(y , 0 ), ymax = pmax(y , 0 ),
58- xmin = x - width * (1 - just ), xmax = x + width * just ,
59- width = NULL , just = NULL
60- )
61- flip_data(data , params $ flipped_aes )
62- },
63-
64- draw_panel = function (self , data , panel_params , coord , lineend = " butt" ,
65- linejoin = " mitre" , width = NULL , flipped_aes = FALSE ) {
66- # Hack to ensure that width is detected as a parameter
67- ggproto_parent(GeomRect , self )$ draw_panel(
68- data ,
69- panel_params ,
70- coord ,
71- lineend = lineend ,
72- linejoin = linejoin
73- )
74- },
75-
76- rename_size = TRUE
77- )
34+ # TODO: deprecate this
35+ GeomCol <- ggproto(" GeomCol" , GeomBar )
0 commit comments