Python matplotlib:更改轴方向

Python matplotlib:更改轴方向,python,matplotlib,figure,Python,Matplotlib,Figure,我使用matplotlib绘制了一个三维图形 def showlab(dic, title): global driehoeken fig = plt.figure() ax = fig.add_subplot(111, projection = '3d') lijst = np.array(driehoeken) lijst = np.around(lijst, 2) poly3d = [[lijst[i, j*3:j*3+3]for j

我使用matplotlib绘制了一个三维图形

def showlab(dic, title): 
    global driehoeken
    fig = plt.figure() 
    ax = fig.add_subplot(111, projection = '3d') 
    lijst = np.array(driehoeken)
    lijst = np.around(lijst, 2)
    poly3d = [[lijst[i, j*3:j*3+3]for j in range(3)]for i in range(lijst.shape[0])]
    ax.add_collection3d(Poly3DCollection(poly3d, linewidth = 1)) 
    ax.set_xlim(0, 100) 
    ax.set_xlabel('l') 
    ax.set_ylim(-150, 150) 
    ax.set_ylabel('a')
    ax.set_zlim(-150, 150)
    ax.set_zlabel('b') 
    plt.title(title)
    plt.show()

此图绘制了一个“b”轴朝上的图形。但我想让l轴朝上,但要遵守右手法则。有没有一个简单的方法可以做到这一点

只需按正确顺序设置限制,即可反转轴:

ax.set_xlib(100, 0)

StackOverflow中有一个类似的问题:

只要按正确的顺序设置限制,就可以反转轴:

ax.set_xlib(100, 0)
StackOverflow中有一个类似的问题: