View source: R/zDepricated_2_render.r
render_ | R Documentation |
, see ggtour
.
Typically called by render_plotly()
or render_gganimate()
. Takes the
result of array2df()
, and renders them into a ggplot2 object.
render_( frames, axes = "center", manip_col = "blue", line_size = 0.6, text_size = 4, aes_args = list(), identity_args = list(), ggproto = list(theme_spinifex()) )
frames |
The result of |
axes |
Position of the axes, expects one of: "center", "left", "right", "bottomleft", "topright", "off", or a map_absolute() call. Defaults to "center". |
manip_col |
String of the color to highlight the |
line_size |
The size of the lines of the unit circle and variable contributions of the basis. Defaults to .6. |
text_size |
The size of the text labels of the variable contributions of the basis. Defaults to 4. |
aes_args |
A list of aesthetic arguments to passed to
|
identity_args |
A list of static, identity arguments passed into
|
ggproto |
A list of ggplot2 function calls.
Anything that would be "added" to ggplot(); in the case of applying a theme,
|
library(spinifex) message("It's suggested to switch to the proto api, see `?ggtour` to get started.") ## Setup dat_std <- scale_sd(wine[, 2:6]) clas <- wine$Type bas <- basis_pca(dat_std) mv <- manip_var_of(bas) mt_array <- manual_tour(basis = bas, manip_var = mv) mt_df_ls <- array2df(basis_array = mt_array, data = dat_std) ## Required arguments render_(frames = mt_df_ls) ## Full arguments require("ggplot2") render_(frames = mt_df_ls, axes = "left", manip_col = "purple", aes_args = list(color = clas, shape = clas), identity_args = list(size = 1.5, alpha = .7), ggproto = list(theme_minimal(), ggtitle("My title"), scale_color_brewer(palette = "Set2")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.