mtcars2 <- dplyr::mutate(mtcars, cyl = factor(cyl))
mtcars2 %>% ggvis(~wt, ~mpg, stroke = ~cyl) %>% layer_lines()
# Equivalent to
mtcars2 %>% ggvis(~wt, ~mpg, stroke = ~cyl) %>%
group_by(cyl) %>% dplyr::arrange(wt) %>% layer_paths()Run the code above in your browser using DataLab