KURT PETERS wrote:
> can someone explain why scatter would work but gca.annotate would not when 
> plotting data on a map (see previous posts)?
>   I've also tried pylib.figtext and that doesn't work either.
>
> Regards,
> Kurt
>
>
>   

Kurt:  This works for me (with the latest svn version of basemap and 
matplotlib).  Does it not work for you?

import pylab as p
from mpl_toolkits.basemap import Basemap as Basemap # use for svn
#from matplotlib.toolkits.basemap import Basemap # use for released version
m = Basemap(llcrnrlon=-119,llcrnrlat=22,urcrnrlon=-64,urcrnrlat=49,\
             projection='lcc',lat_1=33,lat_2=45,lon_0=-95,resolution='c')
shp_info = m.readshapefile('citiesx020','cities')
for xy in m.cities:
    p.gca().annotate('x',xy)
m.drawcoastlines()
p.show()

-Jeff

-- 
Jeffrey S. Whitaker         Phone  : (303)497-6313
Meteorologist               FAX    : (303)497-6449
NOAA/OAR/PSD  R/PSD1        Email  : [EMAIL PROTECTED]
325 Broadway                Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web    : http://tinyurl.com/5telg


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to