Skip to content

Commit 8c3248c

Browse files
committed
tweak vignette/docs
1 parent dd29d4f commit 8c3248c

File tree

3 files changed

+9
-1131
lines changed

3 files changed

+9
-1131
lines changed

Diff for: README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,17 @@ If you use [ggplot2](http://cran.r-project.org/web/packages/ggplot2/index.html),
3131

3232
```r
3333
library(plotly)
34+
set.seed(100)
3435
d <- diamonds[sample(nrow(diamonds), 1000), ]
3536
p <- ggplot(data = d, aes(x = carat, y = price)) +
3637
geom_point(aes(text = paste("Clarity:", clarity)), size = 4) +
3738
geom_smooth(aes(colour = cut, fill = cut)) + facet_wrap(~ cut)
3839
(gg <- ggplotly(p))
3940
```
4041

41-
![https://plot.ly/~brnvg/1132](http://imgur.com/tbKybEb)
42+
![https://plot.ly/~agvd/1153](http://imgur.com/tbKybEb)
4243

43-
[Click here](https://plot.ly/~brnvg/1132) to interact with the resulting graph (notice the custom hover text!)
44+
[Click here](https://plot.ly/~agvd/1153) to interact with the resulting graph (notice the custom hover text!)
4445

4546

4647
The `ggplotly()` function converts a ggplot object to a plotly object, so if you like, you may 'post-process' your ggplot graphs to add custom plotly features, for example:

Diff for: vignettes/intro.Rmd

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ knitr::opts_chunk$set(eval = FALSE)
1616

1717
Version 1.0.0 of the [plotly R package](https://github.com/ropensci/plotly) introduces a new high-level interface for working with plotly's JavaScript graphing library from R. The aim of this vignette is to explain the semantics of this interface, but I also recommend perusing [plotly's R homepage](https://plot.ly/r/) for more examples.
1818

19-
## Creating and modifying plotlys
19+
## Creating plotlys
2020

21-
To initiate a plotly object, use `plot_ly()`. Here we turn the `economics` data frame (from the ggplot2 package) into a plotly visualization and store it as the object `p`.
21+
To create a plotly object, start with `plot_ly()`. Here we turn the `economics` data frame (from the ggplot2 package) into a plotly visualization and store it as the object `p`.
2222

2323
```{r}
2424
library(plotly)
@@ -232,7 +232,7 @@ subplot(p2)
232232
</a>
233233
</div>
234234

235-
The `subplot()` function creates "xaxis[0-9]" objects which inherit pre-specified properties, but you can also customize each subplot by referencing these objects in the layout
235+
Part of the magic of `subplot()` is that it generates axis objects with appropriate anchor and domain properties. After generating a subplot, you can always reference these axis objects to customize each plot.
236236

237237
```{r}
238238
layout(

Diff for: vignettes/offline.html

+3-1,126
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)