Learn R Programming

ggvis (version 0.3.0.1)

layer_lines: Layer lines on a plot.

Description

Layer lines on a plot.

Usage

layer_lines(vis, ...)

Arguments

vis
Visualisation to modify.
...
Visual properties.

See Also

link{mark_path}

Examples

Run this code
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