You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`plotly` is an R package for creating interactive web-based graphs via the open source JavaScript graphing library [plotly.js](http://plot.ly/javascript).
20
-
As of version 2.0 (November 17, 2015), Plotly graphs are rendered *locally* through the [htmlwidgets](http://www.htmlwidgets.org/) framework.
19
+
[`plotly`](https://github.com/ropensci/plotly) is an R package for creating interactive web-based graphs via the open source JavaScript graphing library [`plotly.js`](http://plot.ly/javascript).
21
20
21
+
As of version 2.0 (November 17, 2015), graphs created with the `plotly` R package are rendered *locally* through the [`htmlwidgets`](http://www.htmlwidgets.org/) framework.
22
22
23
-
####Installation
23
+
## Installation
24
24
25
-
[`plotly`](https://cran.r-project.org/web/packages/plotly/index.html) is now on [CRAN](https://cran.r-project.org/!
25
+
### Download from CRAN
26
+
27
+
Use the `install.package()` function to install the [`plotly R package`](https://cran.r-project.org/web/packages/plotly/index.html) from [CRAN](https://cran.r-project.org/!
26
28
27
29
```r
28
30
install.packages("plotly")
29
31
```
30
32
31
-
Or install the latest development version (on GitHub) via the devtools R package:
33
+
### Download from GitHub
34
+
35
+
Alternatively, you can install the latest development version of `plotly` from GitHub via the [`devtools`](https://cran.r-project.org/web/packages/devtools/index.html) R package:
32
36
33
37
```r
34
38
devtools::install_github("ropensci/plotly")
35
39
```
36
40
37
-
<br>
38
-
RStudio users should download the latest [RStudio release](https://www.rstudio.com/products/rstudio/download/) for compatibility with htmlwidgets.
41
+
### Note For `RStudio` Users
42
+
43
+
`RStudio` users should ensure that they are using the latest [RStudio release](https://www.rstudio.com/products/rstudio/download/) in order to ensure compatibility with the `htmlwidgets` R package.
39
44
40
-
#### Initialization for Offline Plotting
45
+
##Rendering Charts
41
46
42
-
By default, the `plotly` R package runs locally in your web browser or in the R Studio viewer.
47
+
By default, the `plotly` R package runs locally in your web browser or in the ` viewer.
43
48
44
49
```{r}
45
50
library(plotly)
46
51
p <- plot_ly(midwest, x = ~percollege, color = ~state, type = "box")
47
52
p
48
53
```
49
54
50
-
Simply printing the plot object will render the chart locally in your web browser or in the R Studio viewer.
55
+
Simply printing the plot object will render the chart locally in your web browser or in the `RStudio` viewer.
56
+
57
+
Graphs created with the `plotly` R package are interactive!
58
+
59
+
Click on legend entries to hide/show traces, click-and-drag on the chart to zoom, double-click to autoscale, shift-and-drag to pan.
60
+
61
+
## Next Steps
51
62
52
-
Graphs created with the `plotly` R package are interactive. Click on legend entries to toggle traces, click-and-drag on the chart to zoom, double-click to autoscale, shift-and-drag to pan.
63
+
Once you have installed the `plotly` R package, learn more about the [fundamentals of making charts](https://plot.ly/r/plotly-fundamentals/) and start making [basic charts](https://plot.ly/r/basic-charts/).
0 commit comments