如何增加3D绘图中轴的大小(拉伸)

7 浏览
0 Comments

如何增加3D绘图中轴的大小(拉伸)

我目前有这么多:

x,y,z = data.nonzero()    
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.scatter(x, y, z, zdir='z', c= 'red')
plt.savefig("plot.png")

这将创建以下图像:

[![enter image description here](https://i.stack.imgur.com/HKQVl.png)](https://i.stack.imgur.com/HKQVl.png)

我想做的是将Z轴拉伸9倍,并保持X和Y轴不变。但我想保持相同的坐标。

我尝试了这个方法:

fig = plt.figure(figsize=(4.,35.))

但这只是拉伸了plot.png图像。

0