layer_lines | R Documentation |
layer_lines
differs from layer_paths
in that layer_lines
sorts the data on the x variable, so the line will always proceed from left
to right, whereas layer_paths
will draw a line in whatever order
appears in the data.
layer_lines(vis, ...)
vis |
Visualisation to modify. |
... |
Visual properties. |
layer_paths
mtcars %>% ggvis(~wt, ~mpg, stroke = ~factor(cyl)) %>% layer_lines()
# Equivalent to
mtcars %>% ggvis(~wt, ~mpg, stroke = ~factor(cyl)) %>%
group_by(cyl) %>% dplyr::arrange(wt) %>% layer_paths()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.