How to disable perspective in mplot3d?

Is it possible to disable perspective when building in mplot3d, i.e. use orthogonal projection?

+8
python matplotlib mplot3d
source share
1 answer

Sort, you can run this piece of code before building:

import numpy from mpl_toolkits.mplot3d import proj3d def orthogonal_proj(zfront, zback): a = (zfront+zback)/(zfront-zback) b = -2*(zfront*zback)/(zfront-zback) return numpy.array([[1,0,0,0], [0,1,0,0], [0,0,a,b], [0,0,0,zback]]) proj3d.persp_transformation = orthogonal_proj 

Currently an open problem is found here .

+11
source share

All Articles