File: layer_lines.Rd

package info (click to toggle)
r-cran-ggvis 0.4.7%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 1,716 kB
  • sloc: javascript: 7,373; sh: 25; makefile: 2
file content (29 lines) | stat: -rw-r--r-- 801 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/layer_lines.R
\name{layer_lines}
\alias{layer_lines}
\title{Layer lines on a plot.}
\usage{
layer_lines(vis, ...)
}
\arguments{
\item{vis}{Visualisation to modify.}

\item{...}{Visual properties.}
}
\description{
\code{layer_lines} differs from \code{layer_paths} in that \code{layer_lines}
sorts the data on the x variable, so the line will always proceed from left
to right, whereas \code{layer_paths} will draw a line in whatever order
appears in the data.
}
\examples{
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()
}
\seealso{
\code{\link{layer_paths}}
}