View source: R/2_ggproto_visualize.r
proto_frame_cor2 | R Documentation |
Adds text to the animation, the frame and its specified correlation.
proto_frame_cor2(
text_size = 4,
row_index = TRUE,
xy_position = c(0.7, -0.1),
...
)
text_size |
Size of the text. defaults to 4. |
row_index |
A numeric or logical index of rows to subset to. Defaults to NULL, all observations. |
xy_position |
Vector of the x and y position, the fraction of the range of the data in each direction. The projection data is contained in (0, 1) in each direction. Defaults to c(.7, -.1), in the bottom right. |
... |
Optionally, pass additional arguments to
|
stats::cor
library(spinifex)
dat <- scale_sd(penguins_na.rm[, 1:4])
clas <- penguins_na.rm$species
gt_path <- save_history(dat, grand_tour(), max_bases = 5)
ggt <- ggtour(gt_path, dat, angle = .3) +
proto_default(aes_args = list(color = clas, shape = clas)) +
proto_frame_cor2(xy_position = c(.5, 1.1))
animate_plotly(ggt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.