user3670781 user3670781 - 1 year ago 128
Python Question

How to disable perspective in mplot3d?

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

Answer Source

Sort of, you can run this snippet of code before you plot:

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],
proj3d.persp_transformation = orthogonal_proj

It is currently an open issue found here.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download