Jump to content

File:Plotly 3d cont.png

From 太極

Original file (1,430 × 1,234 pixels, file size: 158 KB, MIME type: image/png)

Summary

library(plotly)
plot_ly(
     iris, 
     x = ~Sepal.Length, 
     y = ~Sepal.Width, 
     z = ~Petal.Length, 
     color = ~Petal.Width,    # Now using a numeric/continuous variable
     type = "scatter3d", 
     mode = "markers",
     marker = list(
         size = 10, 
         opacity = 0.9,
         colorbar = list(title = "Petal Width") # Optional: adds a label to the color scale
     )
 )

File history

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

Date/TimeThumbnailDimensionsUserComment
current14:32, 19 February 2026Thumbnail for version as of 14:32, 19 February 20261,430 × 1,234 (158 KB)Brb (talk | contribs)<syntaxhighlight lang='r'> library(plotly) plot_ly( iris, x = ~Sepal.Length, y = ~Sepal.Width, z = ~Petal.Length, color = ~Petal.Width, # Now using a numeric/continuous variable type = "scatter3d", mode = "markers", marker = list( size = 10, opacity = 0.9, colorbar = list(title = "Petal Width") # Optional: adds a label to the color scale ) ) </syntaxhighlight>

The following page uses this file: