rdrr-io / rdrr-issues

rdrr.io issues
34 stars 7 forks source link

rnotebook.io Welcome notebook plotly clode issue #46

Closed sneumann closed 5 years ago

sneumann commented 5 years ago

Hi, the last cell in the demo notebook on https://rnotebook.io/ does not work. It produces errors:

No trace type specified:
  Based on info supplied, a 'scatter' trace seems appropriate.
  Read more about this trace type -> https://plot.ly/r/reference/#scatter
No scatter mode specifed:
  Setting the mode to markers
  Read more about this attribute -> https://plot.ly/r/reference/#scatter-mode

The following is the correct cell content:

library(plotly)
set.seed(100)
d <- diamonds[sample(nrow(diamonds), 1000), ]
p <- plot_ly(d, x = ~carat, y = ~price, color = ~carat,
        size = ~carat, text = ~paste("Clarity: ", clarity),
       type="scatter", mode="markers")
embed_notebook(p)

Yours, Steffen

ihowson commented 5 years ago

Fixed. Thanks for the detailed report!