[SciPy-User] basemap wrapimage

Gabriele Brambilla gb.gabrielebrambilla at gmail.com
Mon Feb 10 22:03:47 EST 2014


it happens that it plots a default image of the earth.
I want to show on the map an image of which I have a matrix.
Why is not the correct list? isn't it a library of matplotlib? and
matplotlib isn't a Scipy tool?

thanks

Gabriele


2014-02-10 13:35 GMT-05:00 Oleksandr Huziy <guziy.sasha at gmail.com>:

> What happens if you do not supply any arguments to warpimage? Also try
> commenting this line...
>
> I think these could help you:
> http://matplotlib.org/basemap/users/geography.html
> http://matplotlib.org/basemap/users/examples.html
>
> Also I do not think that this list is appropriate for this question ...
>
>
> 2014-02-10 13:21 GMT-05:00 Gabriele Brambilla <
> gb.gabrielebrambilla at gmail.com>:
>
>> 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
>>
>> _______________________________________________
>> SciPy-User mailing list
>> SciPy-User at scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-user
>>
>>
>
>
> --
> Sasha
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20140210/5a9dd47f/attachment.html>


More information about the SciPy-User mailing list