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 environment,but it seems this doesn't work in google colab environment.
you can find my code here
Click on the 3D plot window and drag the mouse on the plot. This should rotate the surface in the direction you move the mouse about the focus point (the origin, by default).
Rotating 3D Graphs When the mouse is moved onto the graph, it will become a circle curve with a clockwise arrow. Drag the mouse to rotate the 3D graph around any axis. To rotate the 3D graph around the X axis press CTRL and drag. To rotate around the Y axis, press SHIFT and drag.
Plot a 3D wireframe with data test data x, y, and z. To make it rotatable, we can set the elevation and azimuth of the axes in degrees (not radians), using view_init() method. To show the figure, use plt. show() method.
To generate an interactive 3D plot first import the necessary packages and create a random dataset. Now using Axes3D(figure) function from the mplot3d library we can generate a required plot directly. Pass the data to the 3D plot and configure the title and labels.
Try plotly (python graphic libraries) 3D scatter plot.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With