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
2
votes
1 answer

Truncated figure with plotly

I am facing a problem with the Scatter3d from plotly: the figure is always truncated at the bottom: I create the plot via plotly.express this way: fig = px.scatter_3d(BFM_pcaFull, x=0, y=1, z=2, color=3) with BFM_pcaFull being the pandas.DataFrame…
TSS22
  • 68
  • 6
2
votes
1 answer

Add legend to mplot3d

For the 3D plot given here (thanks to Redox for his elegant solution posted here): how to go about adding the legend? I tried ax.legend() but got the message No artists with labels found to put in legend. Note that artists whose label start with…
Joe
  • 357
  • 2
  • 10
  • 32
2
votes
0 answers

Pyplot 3D scatter: points from the back overlap with points in the front

I am trying to plot results I received from an optimization model I created. The results are different for several input parameters. As seen in the plot, points which should be in the front lay behind the points which should lay behind it. I found a…
Sjalom123
  • 21
  • 2
2
votes
0 answers

Plotly scatter 3d set camera, reduce white space

I am plotting plotly scatter 3d in spyder IDE and it is working fine. Along with that, I am trying to save a particular camera view as png. This is where I am running issues into. This article…
Mainland
  • 4,110
  • 3
  • 25
  • 56
2
votes
1 answer

How to add data (or single point) to an existing 3d scatter plotly exprees plot in python

I have a code that makes a plot similar to this one: import plotly.express as px import plotly.graph_objects as go df = px.data.tips() fig = go.Figure(data =[go.Scatter3d(x = df['total_bill'], y = df['time'], …
2
votes
1 answer

Representing cluster centers in Plotly Express's px.scatter_3d()

I am trying to perform clustering (i.e., clusters and centroids) using plotly express as highlighted here. Following this example I am able to represent the different clusters. However, I seem to struggle to find information on how I can also…
GKC
  • 447
  • 4
  • 10
2
votes
1 answer

How update 2nd plots axis plotly Scatter3D subplots

Good Day to you, I'm trying to plot the Imaginary and Real part of a complex series over time with plotlies' Scatter3d. X shall be the Real part, Y the imaginary and z Time. BUT I have two series and I would like to display the two resulting…
user15519994
2
votes
1 answer

3D Scatter Plot with Plotly in R without lines

I've been struggling with this for a while. I know I can turn off most hover functionality by including hoverinfo = 'none', but I still see the lines that connect to the 3 axes when plotting a 3D Scatter Plot. Is there a way to turn off that…
Lis
  • 53
  • 7
2
votes
1 answer

Python 3D Scatter Plot - Using categorical variable to adjust color

I am trying to make a 3D Scatter Plot for the movie dataset. I want to adjust the color according to the genre of the movie. I have 5 genres and I want to make Comedy red, Action blue, Adventure green etc. With this code, I can only make yellow and…
2
votes
1 answer

Plotting a multiple linear regression in R using scatter3D() (package plot3D)

I have the following data in a csv…
royer
  • 615
  • 1
  • 6
  • 19
2
votes
1 answer

3d scatter animation in R, plotly

I have a 3D plot in plotly for R that I want to put into a presentation. Is there a way I can animate the 3D space rotating in some way as a .gif or other from R? I understand how to make the plot, how to rotate it on my own, and how to publish it…
Jake L
  • 987
  • 9
  • 21
2
votes
1 answer

How to add annotations to a scatter3D Plotly plot using scene?

I am trying to add a text annotation to points in a scatter3d Plotly plot with a different scene. How can I make the annotation move around with the plot? Even when I sign xref and yref as 'scene' the annotation doesn't move. This is a reproducible…
KGee
  • 771
  • 7
  • 26
2
votes
1 answer

3D scatterplot done with plot3D producing strange behaviour

I'm trying to display a plane of best fit within a 3D scatter plot using the library plot3D. When the code below is run everything seems fine enough, but if I replace the fit with the second fit I get strange behaviour, the plane is no longer a flat…
Geoff
  • 925
  • 4
  • 14
  • 36
2
votes
1 answer

Change colour of data points on selection and remove them with key press in matplotlib 3d scatter plot

I have a 3d scatter plot in matplotlib, and have set up annotations, inspired by answers here, particularly that by Don Cristobal. I have some basic event-capturing code set up, but after several days of trying, I still have not managed to achieve…
Carl
  • 598
  • 2
  • 11
  • 25
2
votes
1 answer

scatter3d - colour dots based on 4th variable

I'd like to do a 3D plot with scatter3d but don't know how to colour the dots based on the values of a fourth variable (here VAR4). Could someone kindly help me? It would be great if by adding these colours, I still keep the fading effect that is in…
Cecile
  • 527
  • 5
  • 22