[SciPy-User] basemap wrapimage
Gabriele Brambilla
gb.gabrielebrambilla at gmail.com
Mon Feb 10 13:21:09 EST 2014
Hi,
I'm trying to use basemap to plot some maps.
I am trying to don't save the figures of the plot but to plot them
automatically on a basemap.
this the code I'm trying to run:
fiq = plt.figure()
axf = fiq.add_subplot(111)
imh = axf.imshow(B)
fiq.canvas.draw()
#trying to build a map
degree = list(range(360))
for d in degree:
map = Basemap(projection='ortho', lat_0 = 0, lon_0 = d, resolution
= 'l', area_thresh = 1000.)
map.warpimage(image=imh)
map.drawmapboundary()
title = str(d)+'.png'
map.savefig(title)
but it doesn't work. it returns
Traceback (most recent call last):
File "building3d.py", line 103, in <module>
map.warpimage(image=imh)
File "C:\Anaconda\lib\site-packages\mpl_toolkits\basemap\__init__.py",
line 40
06, in warpimage
if file.startswith('http'):
AttributeError: 'AxesImage' object has no attribute 'startswith'
And I don't find many tutorials on the web...
thanks
Gabriele
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20140210/30d23d9f/attachment.html>
More information about the SciPy-User
mailing list