Interchange location of y and z axis in 3D matplotlib plot

One possibility is to interchange the position of y and z in the data and label accordingly. instead of

ax.scatter([0.2, 0.5, 0.8], [2.3, 0.47, 1.], [2.1, 5.3, 0.7])

use

ax.scatter([0.2, 0.5, 0.8], [2.1, 5.3, 0.7], [2.3, 0.47, 1.])

and label as ax.set_ylabel('z') and ax.set_zlabel('y')


I don't think that this is currently possible. ax.view_init() would need to accept a third angle too. I opened an issue over at github, https://github.com/matplotlib/matplotlib/issues/14453#issue-452397120, let's hope someone is committed to implement this feature.

Update

The third view angle was recently implemented and has been merged into the matplotlib main branch: https://github.com/matplotlib/matplotlib/pull/21426

It should appear in Matplotlib 3.6.0.