-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Milestone
Description
Not sure if this is necessary, but will be useful.
df1 <- data.frame(x = c(1, 1, 2, 2), y = c(1, 2, 1, 2), z = 1:4)
df2 <- data.frame(x = 1:3, y = 1, z = 1:3)
df3 <- data.frame(y = 1:3, x = 1, z = 1:3)
df4 <- data.frame(x = 1:3, y = 1:3, z = 1:3)
f <- function(d) {
p <- ggplot(d, aes(x, y, fill = z))
print(p + geom_tile(aes(width = 0.1, height = 0.1)) + opts(title = "tile") + geom_text(aes(label = z), colour = "white"))
print(p + geom_raster(aes(width = 0.1, height = 0.1)) + opts(title = "raster") + geom_text(aes(label = z), colour = "white"))
}
f(df1)
f(df2)
f(df3)
f(df4)
Metadata
Metadata
Assignees
Labels
No labels