forked from plotly/plotly.R
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathggplotly.Rd
More file actions
61 lines (51 loc) · 1.69 KB
/
ggplotly.Rd
File metadata and controls
61 lines (51 loc) · 1.69 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggplotly.R
\name{ggplotly}
\alias{ggplotly}
\title{Create plotly graphs using ggplot2 syntax}
\usage{
ggplotly(p = ggplot2::last_plot(), width = NULL, height = NULL,
tooltip = "all", layerData = 1, originalData = TRUE, source = "A",
...)
}
\arguments{
\item{p}{a ggplot object.}
\item{width}{Width of the plot in pixels (optional, defaults to automatic sizing).}
\item{height}{Height of the plot in pixels (optional, defaults to automatic sizing).}
\item{tooltip}{a character vector specifying which aesthetic mappings to show
in the tooltip. The default, "all", means show all the aesthetic mappings
(including the unofficial "text" aesthetic). The order of variables here will
also control the order they appear. For example, use
\code{tooltip = c("y", "x", "colour")} if you want y first, x second, and
colour last.}
\item{layerData}{data from which layer should be returned?}
\item{originalData}{should the "original" or "scaled" data be returned?}
\item{source}{Only relevant for \link{event_data}.}
\item{...}{arguments passed onto methods.}
}
\value{
a plotly object
}
\description{
See up-to-date documentation and examples at
\url{https://plot.ly/ggplot2}
}
\examples{
\dontrun{
# simple example
ggiris <- qplot(Petal.Width, Sepal.Length, data = iris, color = Species)
ggplotly(ggiris)
data(canada.cities, package = "maps")
viz <- ggplot(canada.cities, aes(long, lat)) +
borders(regions = "canada") +
coord_equal() +
geom_point(aes(text = name, size = pop), colour = "red", alpha = 1/2)
ggplotly(viz, tooltip = c("text", "size"))
}
}
\author{
Carson Sievert
}
\seealso{
\code{\link{signup}()}, \code{\link{plot_ly}()}
}