Related changes
Appearance
← R web
Enter a page name to see changes on pages linked to or from that page. (To see members of a category, enter Category:Name of category). Changes to pages on your Watchlist are in bold.
List of abbreviations:
- N
- This edit created a new page (also see list of new pages)
- m
- This is a minor edit
- b
- This edit was performed by a bot
- (±123)
- The page size changed by this number of bytes
19 February 2026
|
|
14:32 | (Upload log) [Brb (4×)] | |||
|
|
14:32 Brb talk contribs uploaded File:Plotly 3d cont.png (<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>) | ||||
|
|
13:51 Brb talk contribs uploaded File:Plotly shiny 3d.png (<syntaxhighlight lang='r'> # method 3: install.packages(c("shiny","plotly")) library(shiny) library(plotly) ui <- fluidPage( titlePanel("3D scatter (plotly)"), sidebarLayout( sidebarPanel( selectInput("x", "X axis", choices = names(iris), selected = "Sepal.Length"), selectInput("y", "Y axis", choices = names(iris), selected = "Sepal.Width"), selectInput("z", "Z axis", choices = names(iris), selected = "Petal.Length") ), mainPanel(plotlyOutput("plot3d")) )...) | ||||
|
|
13:50 Brb talk contribs uploaded File:Threejs 3d.png (<syntaxhighlight lang='r'> # method 2. High-performance WebGL: threejs (great for large datasets) library(threejs) # numeric color vector by Species cols <- as.numeric(iris$Species) pal <- rainbow(length(unique(cols))) widget <- scatterplot3js( x = iris$Sepal.Length, y = iris$Sepal.Width, z = iris$Petal.Length, color = pal[cols], size = .8, # control marker sizes grid = TRUE, renderer = "auto", # or "webgl" (webgl recommended for speed) bg = "white", l...) | ||||
|
|
13:48 Brb talk contribs uploaded File:Plotly 3d.png (<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>) | ||||