File: lines3d.Rd

package info (click to toggle)
r-cran-threejs 0.3.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 2,884 kB
  • sloc: javascript: 28,121; sh: 17; makefile: 12
file content (40 lines) | stat: -rw-r--r-- 1,128 bytes parent folder | download
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
30
31
32
33
34
35
36
37
38
39
40
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scatterplot.R
\name{lines3d}
\alias{lines3d}
\title{Add lines to a 3D scatterplot}
\usage{
lines3d(s, from, to, lwd = 1, alpha = 1, color)
}
\arguments{
\item{s}{A scatterplot object returned by \code{\link{scatterplot3js}}.}

\item{from}{A vector of integer indices of starting points.}

\item{to}{A vector of integer indices of ending points of the same length as \code{from}.}

\item{lwd}{A single numeric value of line width (applies to all lines).}

\item{alpha}{A single numeric value of line alpha (applies to all lines).}

\item{color}{Either a single color value or vector of values as long as \code{from} of line colors;
line colors default to interpolating their vertex point colors.}
}
\value{
A new scatterplot htmlwidget object.
}
\description{
Add lines to a 3D scatterplot
}
\note{
This function replaces the old \code{points3d} approach used by \code{scatterplot3d}.
}
\examples{
\dontrun{
 x <- rnorm(5)
 y <- rnorm(5)
 z <- rnorm(5)
 scatterplot3js(x, y, z, pch="@", color=rainbow(5)) \%>\%
   lines3d(c(1, 2), c(3, 4), lwd=2)
}
}