Description Usage Arguments Value Author(s) See Also Examples
See up-to-date documentation and examples at https://plot.ly/ggplot2
1 2 |
p |
a ggplot object. |
width |
Width of the plot in pixels (optional, defaults to automatic sizing). |
height |
Height of the plot in pixels (optional, defaults to automatic sizing). |
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
|
originalData |
should the "original" or "scaled" data be returned? |
source |
Only relevant for event_data. |
... |
arguments passed onto methods. |
a plotly object
Carson Sievert
signup, plot_ly
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
# 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"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.