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
Copy file name to clipboardExpand all lines: vignettes/intro.Rmd
-43Lines changed: 0 additions & 43 deletions
Original file line number
Diff line number
Diff line change
@@ -161,46 +161,3 @@ To change the default symbols used, use the symbols argument. All the valid symb
161
161
plot_ly(iris, x = Petal.Length, y = Petal.Width, mode = "markers",
162
162
symbol = Species, symbols = c("cross", "square", "triangle-down"))
163
163
```
164
-
165
-
166
-
### The group argument and `subplot()`
167
-
168
-
Using the group argument splits the data into different plotly "traces".
169
-
170
-
```{r}
171
-
plot_ly(iris, x = Petal.Length, y = Petal.Width,
172
-
group = Species, mode = "markers")
173
-
```
174
-
175
-
Although we haven't specified a coloring scheme, plotly will employ one on it's own default scheme. The group argument is quite powerful when used in conjunction with `subplot()` in order to anchor traces onto different axes.
176
-
177
-
```{r}
178
-
iris$id <- as.integer(iris$Species)
179
-
p <- plot_ly(iris, x = Petal.Length, y = Petal.Width, group = Species,
180
-
xaxis = paste0("x", id), mode = "markers")
181
-
subplot(p)
182
-
```
183
-
184
-
Since `subplot()` does not assume x/y axes are on a common scale, it does not impose any restrictions on the range by default. However, you can change this by pre-specifying the range of the [axis objects](https://plot.ly/r/reference/#xaxis) via the `layout()` function.
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.
196
-
197
-
```{r}
198
-
layout(
199
-
subplot(p2),
200
-
yaxis2 = list(title = ""),
201
-
yaxis3 = list(title = "")
202
-
)
203
-
```
204
-
205
-
206
-
[See here](https://plot.ly/r/map-subplots-and-small-multiples/) for another example of using the group argument to make small multiples (with maps!).
<mxfile userAgent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36" version="5.5.0.1" editor="www.draw.io" type="device"><diagram>7VpLb+MgEP41kXYvkR9pHsemr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