python meshgrid大小和线条粗细

时间:2012-09-06 10:07:05

标签: python grid plot matplotlib

我正在尝试在我的表面图的表面上制作一个网格,现在我知道线框不起作用,并且网格命令完全不同。但我似乎无法获得像enter image description here这样的网格,而是像enter image description here这样的网格,而改变rstride和cstride只会让它看起来像现代艺术: enter image description here

这是我正在使用的绘图命令

fig = plt.figure()
ax = fig.add_subplot(111,projection="3d")

plot = ax.plot_surface(x,y,z, rstride=1, cstride=1, cmap=cm.jet, shade=True,
                       linewidth=1, antialiased=False)

1 个答案:

答案 0 :(得分:1)

如果你对你想要实现的目标更清楚,那将会很有帮助。你的第二个情节中的网格看起来很好 - 你期待什么?如何完全您希望网格出现?

您说您对更改rstridecstride参数值的结果不满意,但您没有说明要更改这些参数的内容。您是否阅读过有关这些论点的文档?

另外,请发布minimal, self-contained working example of your code,因为绘制的网格取决于您构建数据的方式(每个维度中的点数等)。不要让我们查看您的previous questions

无论如何,咆哮。只需将rstridecstride值加倍即可获得

enter image description here

不是问题中的第三个数字。上面的内容更像你的追求吗?