Imshow: extent and aspect
问题 I\'m writing a software system that visualizes slices and projections through a 3D dataset. I\'m using matplotlib and specifically imshow to visualize the image buffers I get back from my analysis code. Since I\'d like to annotate the images with plot axes, I use the extent keyword that imshow supplies to map the image buffer pixel coordinates to a data space coordinate system. Unfortuantely, matplotlib doesn\'t know about units. Say (taking an artificial example) that I want to plot an image