python - Changing center of rotation in a Matplotlib 3D plot -
i have 3d line plot in matplotlib, created using following code:
def view(self): mpl_toolkits.mplot3d import axes3d #noqa import matplotlib.pyplot plt ax = plt.figure().gca(projection='3d') history = np.array(self.position_history) x, y ,z = history[:, 0], history[:, 1], history[:, 2] ax.plot(x, y, z) plt.show() here history mx3 array of points. works fine , pops plot expected. able click , drag modify azimuth , elevation interactively. able zoom right-clicking , dragging.
however wondering if possible modify center point of pan , zoom? zoom top-right, , pan around top right center of rotation. if have ever used solidworks or cad program, behavior after. doable? if not interactively, can programmatically?
and finally, if none of possible in matplotlib, there library can accomplish want?
i have run trouble in past in terms of customizing mplot3d, rather unsuccessfully..
and finally, if none of possible in matplotlib, there library can accomplish want?
you can mayavi
here relevant stackoverflow answer customizing how interact plot
there various useful tips , tricks animating in general , using mayavi
(apologies if isn't useful)
Comments
Post a Comment