make_tiles | R Documentation |
Used to help make tiles.
make_tiles(
df,
x_var,
y_var,
xstretch = 1.2,
ystretch = 2,
add_animation_vars = TRUE
)
df |
the data frame |
x_var, y_var |
the variables to be summarised |
xstretch, ystretch |
how much extra to expand the width and height of the tiles. Set to 1 for no expansion. NB expanding the data range might expand the range of your chart. |
add_animation_vars |
add a selection of variables to aid tweening? |
data <- data.frame(x1 = runif(10), y2=runif(10))
tiles <- make_tiles(data, x1, y2, ystretch=1, add=FALSE)
library(ggplot2)
ggplot(data, aes(x=x1, y=y2)) +
geom_tile(data=tiles, aes(width=width, height=height),
colour="red", fill=NA) +
geom_point()
make_tiles(data, x1, y2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.