문제

Is it possible to create 3D scatterplots in sage?

By scatterplot I mean graph like this: alt text

도움이 되었습니까?

해결책

Absolutely. If you've got a list of tuples that represent your points, something like:

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

that will plot the two points given in point_list, you can add axis labels with standard sage plotting options.

다른 팁

You can, as indicated in the accepted answer. To produce exactly that graph (http://matplotlib.org/examples/mplot3d/scatter3d_demo.html) from Sage you can use matplotlib: copy the code of the example in a cell (I'm assuming you are using the notebook) and substitute the last line

plt.show()

with

plt.savefig("")
plt.close("all")
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top