3D scattered image in a sage

Is it possible to create three-dimensional scatterplots in sage ?

By using a scatterplot, I mean a graph as follows: alt text

+7
source share
2 answers

That's right. If you have a list of tuples that represent your points, something like:

point_list=[(0.,1.,2.), (2.,2.,3.)] point3d(point_list) 

which will display the two points indicated in point_list, you can add axis labels with standard step construction parameters.

+9
source

You can, as indicated in the accepted answer. To get exactly this graph ( http://matplotlib.org/examples/mplot3d/scatter3d_demo.html ) from Sage you can use matplotlib: copy the example code into the cell (I assume you are using a laptop) and replace the last line

 plt.show() 

from

 plt.savefig("") plt.close("all") 
+2
source

All Articles