Skip to content

Commit 4a684f0

Browse files
committed
Revert "proof-of-principle hack"
This reverts commit 45920fb.
1 parent afbb942 commit 4a684f0

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

R/geom-.r

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,13 @@ Geom <- ggproto("Geom",
6767
)
6868
},
6969

70-
draw_layer = function(self, data, params, layout, coord, th) {
71-
print("here")
70+
draw_layer = function(self, data, params, layout, coord) {
7271
if (empty(data)) {
7372
n <- if (is.factor(data$PANEL)) nlevels(data$PANEL) else 1L
7473
return(rep(list(zeroGrob()), n))
7574
}
7675

7776
# Trim off extra parameters
78-
if(is.complex(data$colour)) data$colour <- th$plot.title$colour
79-
8077
params <- params[intersect(names(params), self$parameters())]
8178

8279
args <- c(list(quote(data), quote(panel_scales), quote(coord)), params)

R/geom-text.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ GeomText <- ggproto("GeomText", Geom,
164164
required_aes = c("x", "y", "label"),
165165

166166
default_aes = aes(
167-
colour = 1i, size = 3.88, angle = 0, hjust = 0.5,
167+
colour = "black", size = 3.88, angle = 0, hjust = 0.5,
168168
vjust = 0.5, alpha = NA, family = "", fontface = 1, lineheight = 1.2
169169
),
170170

R/layer.r

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,15 +301,14 @@ Layer <- ggproto("Layer", NULL,
301301
self$stat$finish_layer(data, self$stat_params)
302302
},
303303

304-
draw_geom = function(self, data, layout, coord, th) {
304+
draw_geom = function(self, data, layout, coord) {
305305
if (empty(data)) {
306306
n <- nrow(layout$panel_layout)
307307
return(rep(list(zeroGrob()), n))
308308
}
309309

310310
data <- self$geom$handle_na(data, self$geom_params)
311-
print("damn you")
312-
self$geom$draw_layer(data, self$geom_params, layout, coord, th)
311+
self$geom$draw_layer(data, self$geom_params, layout, coord)
313312
}
314313
)
315314

R/plot-build.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ ggplot_gtable <- function(data) {
147147
data <- data$data
148148
theme <- plot_theme(plot)
149149

150-
geom_grobs <- Map(function(l, d) l$draw_geom(d, layout, plot$coordinates, th = theme),
150+
geom_grobs <- Map(function(l, d) l$draw_geom(d, layout, plot$coordinates),
151151
plot$layers, data)
152152

153153
plot_table <- layout$render(geom_grobs, data, plot$coordinates, theme, plot$labels)

0 commit comments

Comments
 (0)