Skip to content

Commit 83dcccd

Browse files
authored
Correct example to use colors instead of colorscale
See plotly/plotly.R#1846
1 parent ab540b7 commit 83dcccd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

r/2015-07-30-3d-scatter-plots.Rmd

+4-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ fig
4040
library(plotly)
4141
4242
fig <- plot_ly(mtcars, x = ~wt, y = ~hp, z = ~qsec,
43-
marker = list(color = ~mpg, colorscale = c('#FFE1A1', '#683531'), showscale = TRUE))
43+
color = ~mpg,
44+
colors = c('#FFE1A1', '#683531'))
4445
fig <- fig %>% add_markers()
4546
fig <- fig %>% layout(scene = list(xaxis = list(title = 'Weight'),
4647
yaxis = list(title = 'Gross horsepower'),
@@ -52,7 +53,7 @@ fig <- fig %>% layout(scene = list(xaxis = list(title = 'Weight'),
5253
xref = 'paper',
5354
yref = 'paper',
5455
showarrow = FALSE
55-
))
56+
))
5657
fig
5758
```
5859

@@ -100,4 +101,4 @@ fig
100101

101102
#Reference
102103

103-
See [https://plotly.com/r/reference/#scatter3d](https://plotly.com/r/reference/#scatter3d) for more information and chart attribute options!
104+
See [https://plotly.com/r/reference/#scatter3d](https://plotly.com/r/reference/#scatter3d) for more information and chart attribute options!

0 commit comments

Comments
 (0)