Hi,
Using matplotlib 0.87.2, I've been trying to plot points on top of an
image. The image without points fills axes of the extent requested,
but using plot to add a point on top of the image changes the axes
lengths and gives unwanted white margins around the edges. Here's an
example. Any help would be greatly appreciated!
Bob Simpson
from pylab import *
# Sample image.
image = rand(12,6)
# This choice for extent works fine... It produces no white margins.
#extent = [-80, 60, -60, 40]
# This choice gives unwanted white margins,
# except when no point is plotted.
extent = [-80.,64., -74.,48.]
ax1 = axes()
ax1.im = imshow(image, origin='lower', extent=extent)
# Plot point on image.
hold(True)
ax1.plot([0.0],[0.0],'wo')
show()
|