Guangchuang Yu authored on 28/09/2019 11:59:29
Showing1 changed files

... ...
@@ -42,7 +42,7 @@ stat_tree <- function(mapping=NULL, data=NULL, geom="segment", position="identit
42 42
         list(layer(data=data,
43 43
                    mapping=mapping,
44 44
                    stat=StatTreeHorizontal,
45
-                   geom = GeomTreeHorizontal,
45
+                   geom = geom, ## GeomTreeHorizontal,
46 46
                    position=position,
47 47
                    show.legend = show.legend,
48 48
                    inherit.aes = inherit.aes,
... ...
@@ -64,7 +64,7 @@ stat_tree <- function(mapping=NULL, data=NULL, geom="segment", position="identit
64 64
                    params=list(layout = layout,
65 65
                                lineend = lineend,
66 66
                                na.rm = na.rm,
67
-                               arrow = arrow,
67
+                               ## arrow = arrow,
68 68
                                rootnode = rootnode,
69 69
                                ...),
70 70
                    check.aes = FALSE
... ...
@@ -89,13 +89,13 @@ stat_tree <- function(mapping=NULL, data=NULL, geom="segment", position="identit
89 89
     }
90 90
 }
91 91
 
92
-GeomTreeHorizontal <- ggproto("GeomTreeHorizontal",  GeomSegment,
93
-                              draw_panel =  function(data, panel_params, coord, ...) {
94
-                                  coords <- coord$transform(data, panel_params)
95
-                                  GeomSegment$draw_panel(data = data, panel_params = panel_params,
96
-                                                         coord = coord, ...)
97
-                              }
98
-                              )
92
+## GeomTreeHorizontal <- ggproto("GeomTreeHorizontal",  GeomSegment,
93
+##                               draw_panel =  function(data, panel_params, coord, ...) {
94
+##                                   coords <- coord$transform(data, panel_params)
95
+##                                   GeomSegment$draw_panel(data = data, panel_params = panel_params,
96
+##                                                          coord = coord, ...)
97
+##                               }
98
+##                               )
99 99
 
100 100
 StatTreeHorizontal <- ggproto("StatTreeHorizontal", Stat,
101 101
                               required_aes = c("node", "parent", "x", "y"),