Interactive pixel information of an image

There a couple of different ways to go about this. You can monkey-patch ax.format_coord, similar to this official example. I’m going to use a slightly more “pythonic” approach here that doesn’t rely on global variables. (Note that I’m assuming no extent kwarg was specified, similar to the matplotlib example. To be fully general, you need … Read more

Plotting 3D Polygons

I think you’ve almost got it. Is this what you want? from mpl_toolkits.mplot3d import Axes3D from mpl_toolkits.mplot3d.art3d import Poly3DCollection import matplotlib.pyplot as plt fig = plt.figure() ax = Axes3D(fig, auto_add_to_figure=False) fig.add_axes(ax) x = [0,1,1,0] y = [0,0,1,1] z = [0,1,0,1] verts = [list(zip(x,y,z))] ax.add_collection3d(Poly3DCollection(verts)) plt.show() You might also be interested in art3d.pathpatch_2d_to_3d.