Browse files

geom_raster now supports alpha (fixed #596)

  • Loading branch information...
1 parent 6fde629 commit e96c7f74bc3140d2adecff8b426fbba30344141f @kohske kohske committed with wch Jun 25, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 R/geom-raster.r
View
4 R/geom-raster.r
@@ -94,9 +94,9 @@ GeomRaster <- proto(Geom, {
nrow <- max(y_pos) + 1
ncol <- max(x_pos) + 1
-
+
raster <- matrix(NA_character_, nrow = nrow, ncol = ncol)
- raster[cbind(nrow - y_pos, x_pos + 1)] <- data$fill
+ raster[cbind(nrow - y_pos, x_pos + 1)] <- alpha(data$fill, data$alpha)
# Figure out dimensions of raster on plot
x_rng <- c(min(data$xmin, na.rm = TRUE), max(data$xmax, na.rm = TRUE))

0 comments on commit e96c7f7

Please sign in to comment.