I have a python plot, using the following code:
fig = plt.figure()
ax = plt.add_subplot(111)
ax.imshow(an_image)
What I want to do, is simply force the x and y axes, to span a certain minimum and maximum number. (Cannot do this with ax.set_xlim()
or ax.set_ylim()
because those actually change the axis limits). I just want some particular x_min , x_max , y_min, and y_max numbers to show up on my image.
How do I do that?
EDIT: To further clarify what I mean, look at this image below. What I want, are the numbers on the axes written in red. I want them to replace what is already there in black. How do I accomplish that?
Thanks