鼠尾草中的 3D 散点图

发布于 2024-10-07 16:34:42 字数 160 浏览 0 评论 0原文

是否可以在 sage 中创建 3D 散点图?

我所说的散点图是指这样的图表: 替代文本

Is it possible to create 3D scatterplots in sage?

By scatterplot I mean graph like this:
alt text

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

☆獨立☆ 2024-10-14 16:34:42

绝对地。如果您有代表您的点的元组列表,例如:

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

将绘制 point_list 中给出的两个点,您可以使用标准 Sage 绘图选项添加轴标签。

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.

阳光的暖冬 2024-10-14 16:34:42

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")
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文