I'm trying to draw a box on a scaled image, and I notice that when the image is very small, the box seems to be drawn with an offset (see second row of the image):
This behavior seems to be because I'm expecting the top left of the top left pixel to be aligned with the point (0, 0), but it seems that this point is actually aligned with the middle of the pixel. So, the coordinate of the top left corner of the image seems to actually be (-0.5, -0.5).
Is there a way to change the behavior of matplotlib.imshow so coordinates are aligned with the top left of each pixel instead of the centers?

0.5from the box coordinates?