View source: R/kangaroo-plot.R
kangaroo_plot | R Documentation |
This function takes in the data which has been prepared by the anim_prep()
or anim_prep_cat()
and return the ggplot object. The user can still modify
the plot as usual.
kangaroo_plot(
data,
group_palette = NULL,
shade_palette = NULL,
rendering = "gganimate",
time_dependent = FALSE,
...
)
data |
The categorized data. |
group_palette |
The vector of the palette used by the function to supply the color of each group. |
shade_palette |
The vector of the palette used by the function to supply the color to the shaded area. |
rendering |
The choice of method used to create and display the plot, either gganimate or plotly. |
time_dependent |
Logical. Should the visualization be time-dependent? The default is FALSE. |
... |
Additional arguments for customization. See details for more information. |
This function takes categorized data and generates a ggplot object. The kangaroo plot is the plot that shows the movement between groups over time. The point position and point size in the shaded area can be controlled using additional arguments such as height, width, and size. For the shading area, the alpha argument can be used.
Return a ggplot object.
example <- anim_prep(data = dbl_change, id = id, values = values,
time = time, group = gp)
kangaroo_plot(example)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.