View source: R/functions_velocity.R
plot_recentered_velocity | R Documentation |
plot_recentered_velocity
plot_recentered_velocity( tsne_dt, tall_var_a, tall_var_b, x_points, y_points = x_points, points_as_background = FALSE, p = NULL, id_to_plot = NULL, arrow_FUN = NULL, angle_as_color = FALSE )
tsne_dt |
tidy data.table of tsne results. variables names must include: tx, ty, id, and tall_var |
tall_var_a |
an item in tsne_dt$tall_var. the origin for calculating angle/distance. |
tall_var_b |
an item in tsne_dt$tall_var. the destination for calculating angle/distance. |
x_points |
number of equally spaced bins in the x-dimension. Required. |
y_points |
number of equally spaced bins in the y-dimension. Default is x_points. |
points_as_background |
if TRUE, show points in background. |
p |
an existing ggplot to overlay images onto. Default of NULL starts a new plot. |
id_to_plot |
character. ids in tsne_dt$id. Default of NULL causes all ids to be used. |
arrow_FUN |
result of grid::arrow(). Default of NULL does not draw arrowheads. |
angle_as_color |
if TRUE, a rainbow like scale is applied to angle. |
plot where all velocities in a bin transposed to the same origin.
data("tsne_dt") plot_recentered_velocity(tsne_dt, unique(tsne_dt$tall_var)[1], unique(tsne_dt$tall_var)[2], 4) plot_recentered_velocity(tsne_dt, unique(tsne_dt$tall_var)[1], unique(tsne_dt$tall_var)[2], 1, angle_as_color = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.