Questions tagged [scatter3d]

Three-Dimensional Scatterplots and Point Identification

The scatter3d function uses the rgl package to draw 3D scatterplots with various regression surfaces. The function identify3d allows you to label points interactively with the mouse: Press the right mouse button (on a two-button mouse) or the centre button (on a three-button mouse), drag a rectangle around the points to be identified, and release the button. Repeat this procedure for each point or set of “nearby” points to be identified. To exit from point-identification mode, click the right (or centre) button in an empty region of the plot.

244 questions
48
votes
3 answers

How to plot 3D scatter diagram using ggplot?

I tried to use the plotly package, but it is not working in my case at all. The ggplot package is working for 2D plots but it is giving an error when adding one more axis. How to solve this issue? ggplot(data,aes(x=D1,y=D2,z=D3,color=Sample)) + …
R June
  • 655
  • 1
  • 6
  • 8
29
votes
1 answer

Set zlim in matplotlib scatter3d

I have three lists xs, ys, zs of data points in Python and I am trying to create a 3d plot with matplotlib using the scatter3d method. import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111, projection='3d') plt.xlim(290) …
Jann
  • 635
  • 1
  • 6
  • 17
20
votes
2 answers

How to rotate the 3D scatter plots in google colaboratory?

I am generating a 3d scatter plot in google colab, but the problem is that the generated fig is static and is not rotatable. I also tried the command %matplotlib notebook to enable the 3D scatter rotation as it apparently work in jupyter notebook…
16
votes
2 answers

How to create 3D scatter animations

I am graphing out positions in a star cluster, my data is in a dataframe with x,y,z positions as well as a time index. I am able to produce a 3d scatter plot and was trying to produce a rotating plot--I have been somewhat successful, but struggling…
RDS
  • 476
  • 1
  • 6
  • 12
14
votes
2 answers

Add Regression Plane to 3d Scatter Plot in Plotly

I am looking to take advantage of the awesome features in Plotly but I am having a hard time figuring out how to add a regression plane to a 3d scatter plot. Here is an example of how to get started with the 3d plot, does anyone know how to take it…
Josh
  • 1,800
  • 3
  • 15
  • 21
11
votes
1 answer

Scatter 3D for Large Data-Set in Plotly

I have a 3D scatter which wanna plot using Plotly in python. The problem is size of the dataframe is too large and I want to use webgl to plot the graph. As I know plotly has go.Scatter3d function to plot scatters. Also, there is a go.Scattergl to…
OmG
  • 18,337
  • 10
  • 57
  • 90
8
votes
1 answer

plotly px.scatter_3d marker size

I have a dataframe df: x y z ... colours marker_size marker_opacity test1 0.118709 0.219099 -0.024387 ... red 100 0.5 test2 -0.344873 -0.401508 0.169995 ... blue 100 …
Tim Kirkwood
  • 598
  • 2
  • 7
  • 18
8
votes
1 answer

Can I save a high resolution image of my plotly scatter plot?

Can I set a parameter for plotly.graph_objs.go.Scatter3d to either make the graph full screen or to set the save resolution higher? The current resolution that is being saved when using the built in save plot function is 983x525. I would like to at…
rzaratx
  • 756
  • 3
  • 9
  • 29
7
votes
3 answers

3D scatter plot in Julia

Working in Julia and using Plots, I have an array of points that lie on two distinct surfaces. The points are mixed together such that doing a surface plot looks like garbage, because it tries to connect points on the two surfaces. I think the…
Yly
  • 2,150
  • 4
  • 20
  • 33
7
votes
2 answers

scatterplot3d: regression plane with residuals

Using scatterplot3d in R, I'm trying to draw red lines from the observations to the regression plane: wh <- iris$Species != "setosa" x <- iris$Sepal.Width[wh] y <- iris$Sepal.Length[wh] z <- iris$Petal.Width[wh] df <- data.frame(x, y, z) LM <-…
Frans Rodenburg
  • 476
  • 6
  • 17
6
votes
1 answer

Python Plotly: How to add an image to a 3D scatter plot

I am trying to visualize multiple 2d trajectories (x, y) in a 3D scatter plot where the z axis is time. import numpy as np import pandas as pd import plotly.express as px # Sample data: 3 trajectories t = np.linspace(0, 10, 200) df =…
Marcos
  • 695
  • 9
  • 22
6
votes
1 answer

3D Scatterplot with strings in Python

I tried to do a 3D scatter plot in Python with string categories (i.e. activation functions and solvers for a neural network) on x and y and floating numbers (i.e. accuracy score of NN) on the z axis. The following example raises the error:…
S.Maria
  • 131
  • 2
  • 11
6
votes
3 answers

Matplotlib alternative for 3D scatter plots

I am having a hard time using Matplotlib to visualize reprojection results of my data in 3 dimensions after applying Principle components analysis or Linear discriminant analysis. After doing a scatter plot, I cannot rotate the data or change the…
Mehdi
  • 1,370
  • 3
  • 15
  • 26
5
votes
1 answer

Plotly: How to define marker color based on category string value for a 3d scatter plot?

I am using plotly.graph_object for 3D scatter plot. I'd like to define marker color based on category string value. The category values are A2, A3, A4. How to modify below code? Thanks Here is what I did: import plotly.graph_objects as…
roudan
  • 3,082
  • 5
  • 31
  • 72
5
votes
1 answer

Background colour for text labels in Plotly?

I am displaying a section of a dim-reduced Word Embedding with Plotly in Python. I am using a 3D Scatter Plot, and everything is working fine so far, with this code (broken down): fig = go.Figure() trace = go.Scatter3d( x=df[0], …
backendboi
  • 131
  • 1
  • 6
1
2 3
16 17