Skip to content

Commit

Permalink
Merge pull request #334 from kohske/fix/geom-raster
Browse files Browse the repository at this point in the history
fix in geom-raster vertical alignment (Fixes #333).
  • Loading branch information
hadley committed Dec 30, 2011
2 parents 71268c6 + fc9666d commit f77f22b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/geom-raster.r
Expand Up @@ -45,7 +45,7 @@ GeomRaster <- proto(Geom, {
x_rng <- range(data$x, na.rm = TRUE)
y_rng <- range(data$y, na.rm = TRUE)

rasterGrob(raster, x_rng[1] - width / 2, y_rng[1] - height / 2,
rasterGrob(raster[nrow(raster):1, ], x_rng[1] - width / 2, y_rng[1] - height / 2,
diff(x_rng) + width, diff(y_rng) + height, default.units = "native",
just = c("left","bottom"), interpolate = FALSE)
}
Expand Down

0 comments on commit f77f22b

Please sign in to comment.