plot.ly

plot.ly

plot.ly

Quick experiment on embedding plot.ly graphics.

{% highlight r %} library(ggplot2) library(plotly) {% endhighlight %}

Basic plotly

{% highlight r %} plot_ly(iris, x = Petal.Length, y = Petal.Width, color = Species, mode = “markers”) {% endhighlight %}

{% highlight text %}

Error in html_screenshot(x): Please install the webshot package (if not on CRAN, try devtools::install_github(“wch/webshot”))

{% endhighlight %}

Now using ggplot2

{% highlight r %} ggiris <- qplot(Petal.Width, Sepal.Length, data = iris, color = Species) ggplotly(ggiris) {% endhighlight %}

{% highlight text %}

Error in html_screenshot(x): Please install the webshot package (if not on CRAN, try devtools::install_github(“wch/webshot”))

{% endhighlight %}

This next one is embedded from plot.ly.

This post is licensed under CC BY 4.0 by the author.