Jump to content

File:Plotly 3d.png

From 太極

Original file (1,472 × 1,246 pixels, file size: 140 KB, MIME type: image/png)

Summary

library(plotly)

p <- plot_ly(
  iris,
  x = ~Sepal.Length,
  y = ~Sepal.Width,
  z = ~Petal.Length,
  color = ~Species,
  type = "scatter3d",
  mode = "markers",
  marker = list(
    size = 10,   # fixed size
    opacity = 0.9
  )
)
p  # displays in RStudio Viewer or browser
# htmlwidgets::saveWidget(p, "iris_3d_plotly.html", selfcontained = TRUE)

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current13:48, 19 February 2026Thumbnail for version as of 13:48, 19 February 20261,472 × 1,246 (140 KB)Brb (talk | contribs)<syntaxhighlight lang='r'> library(plotly) p <- plot_ly( iris, x = ~Sepal.Length, y = ~Sepal.Width, z = ~Petal.Length, color = ~Species, type = "scatter3d", mode = "markers", marker = list( size = 10, # fixed size opacity = 0.9 ) ) p # displays in RStudio Viewer or browser # htmlwidgets::saveWidget(p, "iris_3d_plotly.html", selfcontained = TRUE) </syntaxhighlight>

The following page uses this file: