Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove old icon code

  • Loading branch information...
commit 0bfacb9d324f79eec5d41f2370e1d91fafc8c06e 1 parent 441deae
Winston Chang wch authored
Showing with 4 additions and 341 deletions.
  1. +0 −8 R/coord-cartesian-.r
  2. +0 −2  R/coord-fixed.r
  3. +0 −10 R/coord-flip.r
  4. +0 −8 R/coord-map.r
  5. +0 −3  R/coord-polar.r
  6. +0 −9 R/coord-transform.r
  7. +0 −8 R/facet-grid-.r
  8. +0 −8 R/facet-null.r
  9. +0 −1  R/geom-abline.r
  10. +0 −5 R/geom-bar-.r
  11. +0 −6 R/geom-bar-histogram.r
  12. +0 −7 R/geom-boxplot.r
  13. +0 −7 R/geom-crossbar.r
  14. +0 −7 R/geom-dotplot.r
  15. +0 −8 R/geom-error.r
  16. +0 −8 R/geom-errorh.r
  17. +0 −5 R/geom-freqpoly.r
  18. +0 −2  R/geom-hline.r
  19. +0 −2  R/geom-linerange.r
  20. +0 −1  R/geom-path-.r
  21. +0 −6 R/geom-path-contour.r
  22. +1 −3 R/geom-path-density2d.r
  23. +0 −5 R/geom-path-line.r
  24. +0 −7 R/geom-path-step.r
  25. +0 −5 R/geom-point-.r
  26. +0 −5 R/geom-point-jitter.r
  27. +0 −7 R/geom-pointrange.r
  28. +0 −2  R/geom-polygon.r
  29. +0 −9 R/geom-quantile.r
  30. +0 −5 R/geom-raster.r
  31. +0 −5 R/geom-rect.r
  32. +1 −9 R/geom-ribbon-.r
  33. +0 −5 R/geom-ribbon-density.r
  34. +0 −3  R/geom-segment.r
  35. +0 −7 R/geom-smooth.r
  36. +0 −1  R/geom-text.r
  37. +0 −4 R/geom-tile.r
  38. +0 −14 R/geom-violin.r
  39. +0 −1  R/geom-vline.r
  40. +0 −5 R/position-dodge.r
  41. +0 −4 R/position-fill.r
  42. +0 −6 R/position-identity.r
  43. +0 −2  R/position-jitter.r
  44. +1 −5 R/position-stack.r
  45. +0 −7 R/scale-alpha.r
  46. +0 −6 R/scale-brewer.r
  47. +0 −4 R/scale-date.r
  48. +0 −3  R/scale-datetime.r
  49. +0 −8 R/scale-gradient.r
  50. +0 −8 R/scale-gradient2.r
  51. +0 −8 R/scale-gradientn.r
  52. +0 −6 R/scale-grey.r
  53. +0 −6 R/scale-hue.r
  54. +0 −2  R/scale-identity.r
  55. +0 −8 R/scale-linetype.r
  56. +0 −1  R/scale-manual.r
  57. +0 −10 R/scale-shape.r
  58. +0 −5 R/scale-size.r
  59. +0 −1  R/stat-bin.r
  60. +0 −1  R/stat-bindot.r
  61. +0 −1  R/stat-boxplot.r
  62. +0 −2  R/stat-contour.r
  63. +0 −2  R/stat-density-2d.r
  64. +0 −1  R/stat-density.r
  65. +0 −1  R/stat-identity.r
  66. +0 −1  R/stat-quantile.r
  67. +1 −3 R/stat-smooth.r
  68. +0 −1  R/stat-sum.r
  69. +0 −4 R/stat-vline.r
  70. +0 −1  R/stat-ydensity.r
8 R/coord-cartesian-.r
View
@@ -83,11 +83,3 @@ train_cartesian <- memoise(function(scale, limits, name) {
names(out) <- paste(name, names(out), sep = ".")
out
})
-
-icon.cartesian <- function(.) {
- gTree(children = gList(
- segmentsGrob(c(0, 0.25), c(0.25, 0), c(1, 0.25), c(0.25, 1), gp=gpar(col="grey50", lwd=0.5)),
- segmentsGrob(c(0, 0.75), c(0.75, 0), c(1, 0.75), c(0.75, 1), gp=gpar(col="grey50", lwd=0.5)),
- segmentsGrob(c(0, 0.5), c(0.5, 0), c(1, 0.5), c(0.5, 1))
- ))
-}
2  R/coord-fixed.r
View
@@ -34,5 +34,3 @@ coord_equal <- coord_fixed
coord_aspect.fixed <- function(coord, ranges) {
diff(ranges$y.range) / diff(ranges$x.range) * coord$ratio
}
-
-icon.fixed <- function() textGrob("=", gp = gpar(cex=3))
10 R/coord-flip.r
View
@@ -64,13 +64,3 @@ coord_train.flip <- function(coord, scales) {
coord_labels.flip <- function(coord, scales) {
flip_labels(NextMethod())
}
-
-icon.flip <- function(.) {
- angles <- seq(0, pi/2, length=20)[-c(1, 20)]
- gTree(children=gList(
- segmentsGrob(0, 0, 0, 1),
- segmentsGrob(0, 0, 1, 0),
- linesGrob(0.9 * sin(angles), 0.9 * cos(angles), arrow=arrow(length=unit(0.05, "npc"))),
- linesGrob(0.5 * sin(angles), 0.5 * cos(angles), arrow=arrow(ends="first", length= unit(0.05, "npc")))
- ))
-}
8 R/coord-map.r
View
@@ -197,11 +197,3 @@ coord_render_axis_v.map <- function(coord, details, theme) {
guide_axis(pos$y, details$y.labels, "left", theme)
}
-
-icon.map <- function(.) {
- nz <- data.frame(map("nz", plot=FALSE)[c("x","y")])
- nz$x <- nz$x - min(nz$x, na.rm=TRUE)
- nz$y <- nz$y - min(nz$y, na.rm=TRUE)
- nz <- nz / max(nz, na.rm=TRUE)
- linesGrob(nz$x, nz$y, default.units="npc")
-}
3  R/coord-polar.r
View
@@ -263,6 +263,3 @@ coord_labels.polar <- function(coord, scales) {
scales
}
}
-
-
-icon <- function(.) circleGrob(r = c(0.1, 0.25, 0.45), gp=gpar(fill=NA))
9 R/coord-transform.r
View
@@ -128,12 +128,3 @@ train_trans <- memoise(function(scale, limits, trans, name) {
names(out) <- paste(name, names(out), sep = ".")
out
})
-
-# Documentation -----------------------------------------------
-icon <- function(.) {
- breaks <- cumsum(1 / 2^(1:5))
- gTree(children=gList(
- segmentsGrob(breaks, 0, breaks, 1),
- segmentsGrob(0, breaks, 1, breaks)
- ))
-}
8 R/facet-grid-.r
View
@@ -387,14 +387,6 @@ facet_panels.grid <- function(facet, panel, coord, theme, geom_grobs) {
panels
}
-icon.grid <- function(.) {
- gTree(children = gList(
- rectGrob(0, 1, width=0.95, height=0.05, hjust=0, vjust=1, gp=gpar(fill="grey60", col=NA)),
- rectGrob(0.95, 0.95, width=0.05, height=0.95, hjust=0, vjust=1, gp=gpar(fill="grey60", col=NA)),
- segmentsGrob(c(0, 0.475), c(0.475, 0), c(1, 0.475), c(0.475, 1))
- ))
-}
-
#' @S3method facet_vars grid
facet_vars.grid <- function(facet) {
paste(lapply(list(facet$rows, facet$cols), paste, collapse = ", "),
8 R/facet-null.r
View
@@ -66,14 +66,6 @@ facet_render.null <- function(facet, panel, coord, theme, geom_grobs) {
layout
}
-
-icon.facet_null <- function(.) {
- gTree(children = gList(
- rectGrob(0, 1, width=0.95, height=0.05, hjust=0, vjust=1, gp=gpar(fill="grey60", col=NA)),
- rectGrob(0.95, 0.95, width=0.05, height=0.95, hjust=0, vjust=1, gp=gpar(fill="grey60", col=NA)),
- segmentsGrob(c(0, 0.475), c(0.475, 0), c(1, 0.475), c(0.475, 1))
- ))
-}
#' @S3method facet_vars null
facet_vars.null <- function(facet) ""
1  R/geom-abline.r
View
@@ -78,7 +78,6 @@ GeomAbline <- proto(Geom, {
GeomSegment$draw(unique(data), scales, coordinates)
}
- icon <- function(.) linesGrob(c(0, 1), c(0.2, 0.8))
guide_geom <- function(.) "abline"
default_stat <- function(.) StatAbline
5 R/geom-bar-.r
View
@@ -131,9 +131,4 @@ GeomBar <- proto(Geom, {
GeomRect$draw_groups(data, scales, coordinates, ...)
}
guide_geom <- function(.) "polygon"
-
-
- icon <- function(.) {
- rectGrob(c(0.3, 0.7), c(0.4, 0.8), height=c(0.4, 0.8), width=0.3, vjust=1, gp=gpar(fill="grey20", col=NA))
- }
})
6 R/geom-bar-histogram.r
View
@@ -116,10 +116,4 @@ geom_histogram <- function (mapping = NULL, data = NULL, stat = "bin", position
GeomHistogram <- proto(GeomBar, {
objname <- "histogram"
-
- icon <- function(.) {
- y <- c(0.2, 0.3, 0.5, 0.6,0.2, 0.8, 0.5, 0.3)
- rectGrob(seq(0.1, 0.9, by=0.1), y, height=y, width=0.1, vjust=1, gp=gpar(fill="grey20", col=NA))
- }
-
})
7 R/geom-boxplot.r
View
@@ -185,13 +185,6 @@ GeomBoxplot <- proto(Geom, {
linesGrob(c(0.125, 0.875), 0.5)
))
}
- icon <- function(.) {
- gTree(children=gList(
- segmentsGrob(c(0.3, 0.7), c(0.1, 0.2), c(0.3, 0.7), c(0.7, 0.95)),
- rectGrob(c(0.3, 0.7), c(0.6, 0.8), width=0.3, height=c(0.4, 0.4), vjust=1),
- segmentsGrob(c(0.15, 0.55), c(0.5, 0.6), c(0.45, 0.85), c(0.5, 0.6))
- ))
- }
default_stat <- function(.) StatBoxplot
default_pos <- function(.) PositionDodge
7 R/geom-crossbar.r
View
@@ -17,13 +17,6 @@ fatten = 2, ...) {
GeomCrossbar <- proto(Geom, {
objname <- "crossbar"
-
- icon <- function(.) {
- gTree(children=gList(
- rectGrob(c(0.3, 0.7), c(0.6, 0.8), width=0.3, height=c(0.4, 0.4), vjust=1),
- segmentsGrob(c(0.15, 0.55), c(0.5, 0.6), c(0.45, 0.85), c(0.5, 0.6))
- ))
- }
reparameterise <- function(., df, params) {
GeomErrorbar$reparameterise(df, params)
7 R/geom-dotplot.r
View
@@ -261,13 +261,6 @@ GeomDotplot <- proto(Geom, {
)
)
}
-
- icon <- function(.) {
- xpos <- c(1,1,2,3,3,3,4,4,5,5,5,5,6,7,7,7,8,8,9)/10
- ypos <- c(1,2,1,1,2,3,1,2,1,2,3,4,1,1,2,3,1,2,1)/10
- pointsGrob(x = xpos, y = ypos, pch = 19, size = unit(.1, "npc"),
- gp = gpar(col = "black", cex = 0.5), default.units = "npc")
- }
default_stat <- function(.) StatBindot
required_aes <- c("x", "y")
8 R/geom-error.r
View
@@ -47,14 +47,6 @@ geom_errorbar <- function (mapping = NULL, data = NULL, stat = "identity", posit
GeomErrorbar <- proto(Geom, {
objname <- "errorbar"
-
- icon <- function(.) {
- gTree(children=gList(
- segmentsGrob(c(0.3, 0.7), c(0.3, 0.5), c(0.3, 0.7), c(0.7, 0.9)),
- segmentsGrob(c(0.15, 0.55), c(0.3, 0.5), c(0.45, 0.85), c(0.3, 0.5)),
- segmentsGrob(c(0.15, 0.55), c(0.7, 0.9), c(0.45, 0.85), c(0.7, 0.9))
- ))
- }
default_stat <- function(.) StatIdentity
default_aes <- function(.) aes(colour = "black", size=0.5, linetype=1, width=0.5, alpha = NA)
8 R/geom-errorh.r
View
@@ -24,14 +24,6 @@ geom_errorbarh <- function (mapping = NULL, data = NULL, stat = "identity", posi
GeomErrorbarh <- proto(Geom, {
objname <- "errorbarh"
-
- icon <- function(.) {
- gTree(children=gList(
- segmentsGrob(c(0.5, 0.3), c(0.70, 0.30), c(0.9, 0.7), c(0.70, 0.30)),
- segmentsGrob(c(0.5, 0.3), c(0.55, 0.15), c(0.5, 0.3), c(0.85, 0.45)),
- segmentsGrob(c(0.9, 0.7), c(0.55, 0.15), c(0.9, 0.7), c(0.85, 0.45))
- ))
- }
default_stat <- function(.) StatIdentity
default_aes <- function(.) aes(colour = "black", size=0.5, linetype=1, height=0.5, alpha = NA)
5 R/geom-freqpoly.r
View
@@ -19,11 +19,6 @@ geom_freqpoly <- function (mapping = NULL, data = NULL, stat = "bin", position =
GeomFreqpoly <- proto(Geom, {
objname <- "freqpoly"
-
- icon <- function(.) {
- y <- c(0.2, 0.3, 0.5, 0.6,0.2, 0.8, 0.5, 0.3)
- linesGrob(seq(0.1, 0.9, by=0.1), y, gp=gpar(col="grey20"))
- }
default_aes <- function(.) GeomPath$default_aes()
default_stat <- function(.) StatBin
2  R/geom-hline.r
View
@@ -60,8 +60,6 @@ GeomHline <- proto(Geom, {
GeomSegment$draw(unique(data), scales, coordinates)
}
- icon <- function(.) linesGrob(c(0, 1), c(0.5, 0.5))
-
default_stat <- function(.) StatHline
default_aes <- function(.) aes(colour="black", size=0.5, linetype=1, alpha = NA)
guide_geom <- function(.) "path"
2  R/geom-linerange.r
View
@@ -44,7 +44,5 @@ GeomLinerange <- proto(Geom, {
munched <- coord_transform(coordinates, data, scales)
ggname(.$my_name(), GeomSegment$draw(transform(data, xend=x, y=ymin, yend=ymax), scales, coordinates, ...))
}
-
- icon <- function(.) segmentsGrob(c(0.3, 0.7), c(0.1, 0.2), c(0.3, 0.7), c(0.7, 0.95))
})
1  R/geom-path-.r
View
@@ -198,7 +198,6 @@ GeomPath <- proto(Geom, {
default_stat <- function(.) StatIdentity
required_aes <- c("x", "y")
default_aes <- function(.) aes(colour="black", size=0.5, linetype=1, alpha = NA)
- icon <- function(.) linesGrob(c(0.2, 0.4, 0.8, 0.6, 0.5), c(0.2, 0.7, 0.4, 0.1, 0.5))
guide_geom <- function(.) "path"
})
6 R/geom-path-contour.r
View
@@ -15,12 +15,6 @@ lineend = "butt", linejoin = "round", linemitre = 1, na.rm = FALSE, ...) {
GeomContour <- proto(GeomPath, {
objname <- "contour"
- icon <- function(.) {
- ggname(.$my_name(), gTree(children=gList(
- polygonGrob(c(0.45,0.5,0.6, 0.5), c(0.5, 0.4, 0.55, 0.6)),
- polygonGrob(c(0.25,0.6,0.8, 0.5), c(0.5, 0.2, 0.75, 0.9), gp=gpar(fill=NA))
- )))
- }
default_aes <- function(.) aes(weight=1, colour="#3366FF", size = 0.5, linetype = 1, alpha = NA)
default_stat <- function(.) StatContour
4 R/geom-path-density2d.r
View
@@ -22,7 +22,5 @@ GeomDensity2d <- proto(GeomPath, {
objname <- "density2d"
default_stat <- function(.) StatDensity2d
- default_aes <- function(.) aes(weight=1, colour="#3366FF", size = 0.5, linetype = 1, alpha = NA)
- icon <- function(.) GeomContour$icon()
-
+ default_aes <- function(.) aes(weight=1, colour="#3366FF", size = 0.5, linetype = 1, alpha = NA)
})
5 R/geom-path-line.r
View
@@ -63,11 +63,6 @@ geom_line <- function (mapping = NULL, data = NULL, stat = "identity", position
GeomLine <- proto(GeomPath, {
objname <- "line"
-
- icon <- function(.) {
- pos <- seq(0, 1, length=5)
- linesGrob(pos, c(0.2, 0.7, 0.4, 0.8, 0.3))
- }
draw <- function(., data, scales, coordinates, arrow = NULL, ...) {
data <- data[order(data$group, data$x), ]
7 R/geom-path-step.r
View
@@ -31,13 +31,6 @@ direction = "hv", ...) {
GeomStep <- proto(Geom, {
objname <- "step"
- icon <- function(.) {
- n <- 15
- xs <- rep(0:n, each = 2)[-2*(n + 1)] / 15
- ys <- c(0, rep(1:n, each=2)) / 15
-
- linesGrob(xs, ys, gp=gpar(col="grey20"))
- }
details <- "Equivalent to plot(type='s')."
default_aes <- function(.) aes(colour="black", size=0.5, linetype=1, alpha = NA)
5 R/geom-point-.r
View
@@ -147,11 +147,6 @@ GeomPoint <- proto(Geom, {
)
}
- icon <- function(.) {
- pos <- seq(0.1, 0.9, length=6)
- pointsGrob(x=pos, y=pos, pch=19, gp=gpar(col="black", cex=0.5), default.units="npc")
- }
-
default_stat <- function(.) StatIdentity
required_aes <- c("x", "y")
default_aes <- function(.) aes(shape=16, colour="black", size=2, fill = NA, alpha = NA)
5 R/geom-point-jitter.r
View
@@ -38,11 +38,6 @@ na.rm = FALSE, ...) {
GeomJitter <- proto(GeomPoint, {
objname <- "jitter"
- icon <- function(.) {
- pos <- seq(0.1, 0.9, length=6)
- pointsGrob(x=pos, y=jitter(pos, 3), pch=19, gp=gpar(col="black", cex=0.5), default.units="npc")
- }
-
default_stat <- function(.) StatIdentity
default_pos <- function(.) PositionJitter
})
7 R/geom-pointrange.r
View
@@ -17,13 +17,6 @@ geom_pointrange <- function (mapping = NULL, data = NULL, stat = "identity", pos
GeomPointrange <- proto(Geom, {
objname <- "pointrange"
- icon <- function(.) {
- gTree(children=gList(
- segmentsGrob(c(0.3, 0.7), c(0.1, 0.2), c(0.3, 0.7), c(0.7, 0.95)),
- pointsGrob(c(0.3, 0.7), c(0.4, 0.6), pch=19, gp=gpar(col="black", cex=0.5), default.units="npc")
- ))
- }
-
default_stat <- function(.) StatIdentity
default_aes <- function(.) aes(colour = "black", size=0.5, linetype=1, shape=16, fill=NA, alpha = NA)
guide_geom <- function(.) "pointrange"
2  R/geom-polygon.r
View
@@ -64,8 +64,6 @@ GeomPolygon <- proto(Geom, {
)))
}
- icon <- function(.) polygonGrob(c(0.1, 0.4, 0.7, 0.9, 0.6, 0.3), c(0.5, 0.8, 0.9, 0.4, 0.2, 0.3), gp=gpar(fill="grey20", col=NA))
-
default_stat <- function(.) StatIdentity
default_aes <- function(.) aes(colour="NA", fill="grey20", size=0.5, linetype=1, alpha = NA)
required_aes <- c("x", "y")
9 R/geom-quantile.r
View
@@ -19,13 +19,4 @@ GeomQuantile <- proto(GeomPath, {
default_stat <- function(.) StatQuantile
default_aes <- function(.) defaults(aes(weight=1, colour="#3366FF", size=0.5), GeomPath$default_aes())
guide_geom <- function(.) "path"
-
- icon <- function(.) {
- ggname(.$my_name(), gTree(children=gList(
- linesGrob(c(0, 0.3, 0.5, 0.8, 1), c(0.8, 0.65, 0.6, 0.6, 0.8)),
- linesGrob(c(0, 0.3, 0.5, 0.8, 1), c(0.55, 0.45, 0.5, 0.45, 0.55)),
- linesGrob(c(0, 0.3, 0.5, 0.8, 1), c(0.3, 0.25, 0.4, 0.3, 0.2))
- )))
- }
-
})
5 R/geom-raster.r
View
@@ -104,11 +104,6 @@ GeomRaster <- proto(Geom, {
default.units = "native", interpolate = interpolate)
}
-
- icon <- function(.) {
- rectGrob(c(0.25, 0.25, 0.75, 0.75), c(0.25, 0.75, 0.75, 0.25), width=0.5, height=c(0.67, 0.5, 0.67, 0.5), gp=gpar(col="grey20", fill=c("#804070", "#668040")))
- }
-
default_stat <- function(.) StatIdentity
default_aes <- function(.) aes(fill = "grey20", alpha = NA)
required_aes <- c("x", "y")
5 R/geom-rect.r
View
@@ -54,11 +54,6 @@ GeomRect <- proto(Geom, {
}
guide_geom <- function(.) "polygon"
- icon <- function(.) {
- rectGrob(c(0.3, 0.7), c(0.4, 0.8), height=c(0.4, 0.8), width=0.3, vjust=1, gp=gpar(fill="grey20", col=NA))
- }
-
-
})
# Convert rectangle to polygon
10 R/geom-ribbon-.r
View
@@ -90,11 +90,7 @@ GeomRibbon <- proto(Geom, {
))
}
- # Documentation -----------------------------------------------
- icon <- function(.) {
- polygonGrob(c(0, 0.3, 0.5, 0.8, 1, 1, 0.8, 0.5, 0.3, 0), c(0.5, 0.3, 0.4, 0.2, 0.3, 0.7, 0.5, 0.6, 0.5, 0.7), gp=gpar(fill="grey20", col=NA))
- }
- })
+})
#' Area plot.
#'
@@ -129,8 +125,4 @@ GeomArea <- proto(GeomRibbon,{
transform(df, ymin = 0, ymax = y)
}
- # Documentation -----------------------------------------------
- icon <- function(.) {
- polygonGrob(c(0, 0,0.3, 0.5, 0.8, 1, 1), c(0, 1,0.5, 0.6, 0.3, 0.8, 0), gp=gpar(fill="grey20", col=NA))
- }
})
5 R/geom-ribbon-density.r
View
@@ -17,11 +17,6 @@ GeomDensity <- proto(GeomArea, {
objname <- "density"
objname <- "density"
- icon <- function(.) {
- x <- seq(0, 1, length=80)
- y <- dnorm(x, mean=0.5, sd=0.15)
- linesGrob(x, 0.05 + y / max(y) * 0.9, default="npc")
- }
default_stat <- function(.) StatDensity
default_pos <- function(.) PositionIdentity
3  R/geom-segment.r
View
@@ -65,9 +65,6 @@ GeomSegment <- proto(Geom, {
}
- icon <- function(.) segmentsGrob(c(0.1, 0.3, 0.5, 0.7), c(0.3, 0.5, 0.1, 0.9), c(0.2, 0.5, 0.7, 0.9), c(0.8, 0.7, 0.4, 0.3))
-
-
default_stat <- function(.) StatIdentity
required_aes <- c("x", "y", "xend", "yend")
default_aes <- function(.) aes(colour="black", size=0.5, linetype=1, alpha = NA)
7 R/geom-smooth.r
View
@@ -47,13 +47,6 @@ GeomSmooth <- proto(Geom, {
)
}
- icon <- function(.) {
- gTree(children=gList(
- polygonGrob(c(0, 0.3, 0.5, 0.8, 1, 1, 0.8, 0.5, 0.3, 0), c(0.5, 0.3, 0.4, 0.2, 0.3, 0.7, 0.5, 0.6, 0.5, 0.7), gp=gpar(fill="grey60", col=NA)),
- linesGrob(c(0, 0.3, 0.5, 0.8, 1), c(0.6, 0.4, 0.5, 0.4, 0.6))
- ))
- }
-
guide_geom <- function(.) "smooth"
default_stat <- function(.) StatSmooth
1  R/geom-text.r
View
@@ -85,7 +85,6 @@ GeomText <- proto(Geom, {
}
- icon <- function(.) textGrob("text", rot=45, gp=gpar(cex=1.2))
default_stat <- function(.) StatIdentity
required_aes <- c("x", "y", "label")
default_aes <- function(.) aes(colour="black", size=5 , angle=0, hjust=0.5,
4 R/geom-tile.r
View
@@ -87,10 +87,6 @@ GeomTile <- proto(Geom, {
}
- icon <- function(.) {
- rectGrob(c(0.25, 0.25, 0.75, 0.75), c(0.25, 0.75, 0.75, 0.25), width=0.5, height=c(0.67, 0.5, 0.67, 0.5), gp=gpar(col="grey20", fill=c("#804070", "#668040")))
- }
-
default_stat <- function(.) StatIdentity
default_aes <- function(.) aes(fill="grey20", colour=NA, size=0.1, linetype=1, alpha = NA)
required_aes <- c("x", "y")
14 R/geom-violin.r
View
@@ -100,20 +100,6 @@ GeomViolin <- proto(Geom, {
guide_geom <- function(.) "polygon"
- icon <- function(.) {
- y <- seq(-.3, .3, length=40)
- x1 <- dnorm(y, mean = -.15, sd = 0.05) + 1.5*dnorm(y, mean = 0.1, sd = 0.1)
- x2 <- dnorm(y, mean = -.1, sd = 0.1) + dnorm(y, mean = 0.1, sd = 0.1)
-
- y <- c(y, rev(y))
- x1 <- c(x1, -rev(x1)) / max(8 * x1)
- x2 <- c(x2, -rev(x2)) / max(8 * x2)
- gTree(children = gList(
- polygonGrob(x1 + .30, y + .35, default = "npc", gp = gpar(fill = "black")),
- polygonGrob(x2 + .70, y + .55, default = "npc", gp = gpar(fill = "black"))
- ))
- }
-
default_stat <- function(.) StatYdensity
default_pos <- function(.) PositionDodge
default_aes <- function(.) aes(weight=1, colour="grey20", fill="white", size=0.5, alpha = NA, linetype = "solid")
1  R/geom-vline.r
View
@@ -65,7 +65,6 @@ GeomVline <- proto(Geom, {
}
- icon <- function(.) linesGrob(c(0.5, 0.5), c(0, 1))
default_stat <- function(.) StatVline
default_aes <- function(.) aes(colour="black", size=0.5, linetype=1, alpha = NA)
guide_geom <- function(.) "vline"
5 R/position-dodge.r
View
@@ -39,10 +39,5 @@ PositionDodge <- proto(Position, {
collide(data, .$width, .$my_name(), pos_dodge, check.width = FALSE)
}
- icon <- function(.) {
- y <- c(0.5, 0.3)
- rectGrob(c(0.25, 0.75), y, width=0.4, height=y, gp=gpar(col="grey60", fill=c("#804070", "#668040")), vjust=1)
- }
-
})
4 R/position-fill.r
View
@@ -32,8 +32,4 @@ PositionFill <- proto(Position, {
collide(data, .$width, .$my_name(), pos_fill)
}
- icon <- function(.) {
- y <- c(0.5, 0.8)
- rectGrob(0.5, c(0.625, 1), width=0.4, height=c(0.625, 0.375), gp=gpar(col="grey60", fill=c("#804070", "#668040")), vjust=1)
- }
})
6 R/position-identity.r
View
@@ -12,10 +12,4 @@ position_identity <- function (width = NULL, height = NULL) {
PositionIdentity <- proto(Position, {
objname <- "identity"
-
- icon <- function(.) {
- rectGrob(0.5, c(0.5, 0.3), width=0.4, height=c(0.5, 0.3), gp=gpar(col="grey60", fill=c("#804070", "#668040")), vjust=1)
-
- }
-
})
2  R/position-jitter.r
View
@@ -48,6 +48,4 @@ PositionJitter <- proto(Position, {
transform_position(data, trans_x, trans_y)
}
- icon <- function(.) GeomJitter$icon()
-
})
6 R/position-stack.r
View
@@ -52,9 +52,5 @@ PositionStack <- proto(Position, {
collide(data, .$width, .$my_name(), pos_stack)
}
-
- icon <- function(.) {
- y <- c(0.5, 0.8)
- rectGrob(0.5, c(0.5, 0.8), width=0.4, height=c(0.5, 0.3), gp=gpar(col="grey60", fill=c("#804070", "#668040")), vjust=1)
- }
+
})
7 R/scale-alpha.r
View
@@ -31,10 +31,3 @@ scale_alpha_discrete <- function(..., range = c(0.1, 1)) {
discrete_scale("alpha", "alpha_d",
function(n) seq(range[1], range[2], length = n), ...)
}
-
-icon.alpha <- function() {
- x <- c(0.1, 0.3, 0.5, 0.7, 0.9)
- rectGrob(x, width=0.25,
- gp=gpar(fill=alpha("black", x), col=NA)
- )
-}
6 R/scale-brewer.r
View
@@ -37,9 +37,3 @@ scale_colour_brewer <- function(..., type = "seq", palette = 1) {
scale_fill_brewer <- function(..., type = "seq", palette = 1) {
discrete_scale("fill", "brewer", brewer_pal(type, palette), ...)
}
-
-# icon.brewer <- function() {
-# rectGrob(c(0.1, 0.3, 0.5, 0.7, 0.9), width=0.21,
-# gp=gpar(fill=RColorBrewer::brewer.pal(5, "PuOr"), col=NA)
-# )
-# }
4 R/scale-date.r
View
@@ -110,7 +110,3 @@ scale_date <- function(aesthetics, expand = waiver(), breaks = waiver(),
scale_map.date <- function(scale, x, limits = scale_limits(scale)) {
x
}
-
-icon.scale_date <- function() {
- textGrob("14/10/1979", gp=gpar(cex=1))
-}
3  R/scale-datetime.r
View
@@ -71,9 +71,6 @@ scale_y_datetime <- function(..., expand = waiver(), breaks = waiver(),
breaks = breaks, minor_breaks = minor_breaks, ...)
}
-icon.scale_datetime <- function() {
- textGrob("14/10/1979\n10:14am", gp=gpar(cex=0.9))
-}
# base class for scale_{xy}_datetime
scale_datetime <- function(aesthetics, expand = waiver(), breaks = waiver(),
8 R/scale-gradient.r
View
@@ -66,11 +66,3 @@ scale_fill_gradient <- function(..., low = "#132B43", high = "#56B1F7", space =
continuous_scale("fill", "gradient", seq_gradient_pal(low, high, space),
na.value = na.value, ...)
}
-
-icon.gradient <- function(.) {
- g <- scale_fill_gradient()
- g$train(1:5)
- rectGrob(c(0.1, 0.3, 0.5, 0.7, 0.9), width=0.21,
- gp=gpar(fill=g$map(1:5), col=NA)
- )
-}
8 R/scale-gradient2.r
View
@@ -67,11 +67,3 @@ mid_rescaler <- function(mid) {
rescale_mid(x, to, from, mid)
}
}
-
-icon.fill_gradient2 <- function(.) {
- g <- scale_fill_gradient2()
- g$train(1:5 - 3)
- rectGrob(c(0.1, 0.3, 0.5, 0.7, 0.9), width=0.21,
- gp=gpar(fill=g$map(1:5 - 3), col=NA)
- )
-}
8 R/scale-gradientn.r
View
@@ -41,11 +41,3 @@ scale_fill_gradientn <- function(..., colours, values = NULL, space = "Lab", na.
continuous_scale("fill", "gradientn",
gradient_n_pal(colours, values, space), na.value = na.value, ...)
}
-
-icon.gradientn <- function(.) {
- g <- scale_fill_gradientn(colours = rainbow(7))
- g$train(1:5)
- rectGrob(c(0.1, 0.3, 0.5, 0.7, 0.9), width=0.21,
- gp=gpar(fill = g$map(1:5), col=NA)
- )
-}
6 R/scale-grey.r
View
@@ -31,9 +31,3 @@ scale_fill_grey <- function(..., start = 0.2, end = 0.8, na.value = "grey50") {
discrete_scale("fill", "grey", grey_pal(start, end),
na.value = na.value, ...)
}
-
-icon.grey <- function() {
- rectGrob(c(0.1, 0.3, 0.5, 0.7, 0.9), width=0.21,
- gp=gpar(fill=gray(seq(0, 1, length=5)), col=NA)
- )
-}
6 R/scale-hue.r
View
@@ -53,9 +53,3 @@ scale_fill_hue <- function(..., h = c(0, 360) + 15, c = 100, l = 65, h.start = 0
discrete_scale("fill", "hue", hue_pal(h, c, l, h.start, direction),
na.value = na.value, ...)
}
-
-icon.hue <- function() {
- rectGrob(c(0.1, 0.3, 0.5, 0.7, 0.9), width=0.21,
- gp=gpar(fill=hcl(seq(0, 360, length=6)[-6], c=100, l=65), col=NA)
- )
-}
2  R/scale-identity.r
View
@@ -80,5 +80,3 @@ scale_train.identity <- function(scale, x) {
if (scale$guide == "none") return()
NextMethod()
}
-
-icon.identity <- function() textGrob("f(x) = x", gp=gpar(cex=1.2))
8 R/scale-linetype.r
View
@@ -31,11 +31,3 @@ scale_linetype_continuous <- function(...) {
#' @rdname scale_linetype
#' @export
scale_linetype_discrete <- scale_linetype
-
-icon.linetype <- function(.) {
- gTree(children=gList(
- segmentsGrob(0, 0.25, 1, 0.25, gp=gpar(lty=1)),
- segmentsGrob(0, 0.50, 1, 0.50, gp=gpar(lty=2)),
- segmentsGrob(0, 0.75, 1, 0.75, gp=gpar(lty=3))
- ))
-}
1  R/scale-manual.r
View
@@ -67,7 +67,6 @@ scale_alpha_manual <- function(..., values) {
manual_scale("alpha", values, ...)
}
-icon.manual <- function() textGrob("DIY", gp=gpar(cex=1.2))
manual_scale <- function(aesthetic, values, ...) {
pal <- function(n) {
10 R/scale-shape.r
View
@@ -37,13 +37,3 @@ scale_shape_discrete <- scale_shape
scale_shape_continuous <- function(...) {
stop("A continuous variable can not be mapped to shape", call. = FALSE)
}
-
-icon.shape <- function(.) {
- gTree(children=gList(
- circleGrob(0.7, 0.7, r=0.1),
- segmentsGrob(0.2, 0.3, 0.4, 0.3),
- segmentsGrob(0.3, 0.2, 0.3, 0.4),
- polygonGrob(c(0.2, 0.2, 0.4, 0.4), c(0.8, 0.6, 0.6, 0.8)),
- polygonGrob(c(0.6, 0.7, 0.8), c(0.2, 0.4, 0.2))
- ))
-}
5 R/scale-size.r
View
@@ -41,8 +41,3 @@ scale_size_discrete <- function(..., range = c(1, 6)) {
discrete_scale("size", "size_d",
function(n) seq(range[1], range[2], length = n), ...)
}
-
-icon.size <- function() {
- pos <- c(0.15, 0.3, 0.5, 0.75)
- circleGrob(pos, pos, r=(c(0.1, 0.2, 0.3, 0.4)/2.5), gp=gpar(fill="grey50", col=NA))
-}
1  R/stat-bin.r
View
@@ -67,7 +67,6 @@ StatBin <- proto(Stat, {
bin(data$x, data$weight, binwidth=binwidth, origin=origin, breaks=breaks, range=range, width=width, drop = drop, right = right)
}
- icon <- function(.) GeomHistogram$icon()
default_aes <- function(.) aes(y = ..count..)
required_aes <- c("x")
default_geom <- function(.) GeomBar
1  R/stat-bindot.r
View
@@ -159,7 +159,6 @@ StatBindot <- proto(Stat, {
return(data)
}
- icon <- function(.) GeomDotplot$icon()
default_aes <- function(.) aes(y = ..count..)
required_aes <- c("x")
default_geom <- function(.) GeomDotplot
1  R/stat-boxplot.r
View
@@ -26,7 +26,6 @@ StatBoxplot <- proto(Stat, {
objname <- "boxplot"
required_aes <- c("x", "y")
- icon <- function(.) GeomBoxplot$icon()
default_geom <- function(.) GeomBoxplot
calculate_groups <- function(., data, na.rm = FALSE, width = NULL, ...) {
2  R/stat-contour.r
View
@@ -91,8 +91,6 @@ StatContour <- proto(Stat, {
}
- icon <- function(.) GeomContour$icon()
-
default_geom <- function(.) GeomPath
default_aes <- function(.) aes(order = ..level..)
required_aes <- c("x", "y", "z")
2  R/stat-density-2d.r
View
@@ -64,8 +64,6 @@ StatDensity2d <- proto(Stat, {
required_aes <- c("x", "y")
- icon <- function(.) GeomDensity2d$icon()
-
calculate <- function(., data, scales, na.rm = FALSE, contour = TRUE, n = 100, ...) {
df <- data.frame(data[, c("x", "y")])
df <- remove_missing(df, na.rm, name = "stat_density2d", finite = TRUE)
1  R/stat-density.r
View
@@ -114,7 +114,6 @@ StatDensity <- proto(Stat, {
rename(densdf, c(y = "density"))
}
- icon <- function(.) GeomDensity$icon()
default_geom <- function(.) GeomArea
default_aes <- function(.) aes(y = ..density.., fill=NA)
required_aes <- c("x")
1  R/stat-identity.r
View
@@ -24,7 +24,6 @@ StatIdentity <- proto(Stat, {
default_geom <- function(.) GeomPoint
calculate_groups <- function(., data, scales, ...) data
- icon <- function(.) textGrob("f(x) = x", gp=gpar(cex=1.2))
desc_outputs <- list()
1  R/stat-quantile.r
View
@@ -49,7 +49,6 @@ StatQuantile <- proto(Stat, {
default_geom <- function(.) GeomQuantile
default_aes <- function(.) aes()
required_aes <- c("x", "y")
- icon <- function(.) GeomQuantile$icon()
calculate <- function(., data, scales, quantiles=c(0.25, 0.5, 0.75), formula=y ~ x, xseq = NULL, method="rq", na.rm = FALSE, ...) {
try_require("quantreg")
4 R/stat-smooth.r
View
@@ -171,9 +171,7 @@ StatSmooth <- proto(Stat, {
predictdf(model, xseq, se, level)
}
-
- icon <- function(.) GeomSmooth$icon()
-
+
required_aes <- c("x", "y")
default_geom <- function(.) GeomSmooth
})
1  R/stat-sum.r
View
@@ -52,7 +52,6 @@ StatSum <- proto(Stat, {
default_aes <- function(.) aes(size = ..prop..)
required_aes <- c("x", "y")
default_geom <- function(.) GeomPoint
- icon <- function(.) textGrob(expression(Sigma), gp=gpar(cex=4))
calculate_groups <- function(., data, scales, ...) {
4 R/stat-vline.r
View
@@ -28,7 +28,6 @@ StatAbline <- proto(Stat, {
unique(data)
}
- icon <- function(.) GeomAbline$icon()
default_geom <- function(.) GeomAbline
})
@@ -60,8 +59,6 @@ StatVline <- proto(Stat, {
}))
}
- icon <- function(.) GeomVline$icon()
-
required_aes <- c()
default_geom <- function(.) GeomVline
})
@@ -95,7 +92,6 @@ StatHline <- proto(Stat, {
objname <- "hline"
desc <- "Add a horizontal line"
- icon <- function(.) GeomHline$icon()
required_aes <- c()
default_geom <- function(.) GeomHline
1  R/stat-ydensity.r
View
@@ -78,7 +78,6 @@ StatYdensity <- proto(Stat, {
densdf
}
- icon <- function(.) GeomViolin$icon()
default_geom <- function(.) GeomViolin
required_aes <- c("x", "y")
Please sign in to comment.
Something went wrong with that request. Please try again.