Hi all,
trying to fill some shapefiles polygons, I run into trouble like you can see
here with the fillstates.py basemap 0.9.5 example:
#####################################
|examples|[1]>run fillstates.py
(273, 5, [-179.14734000000001, 17.884813000000001, 0.0, 0.0], [179.77847,
71.352560643999809, 0.0, 0.0])
['PERIMETER', 'DIVISION', 'NAME', 'AREA', 'RINGNUM', 'REGION', 'LSAD',
'LSAD_TRANS', 'STATE', 'ST99_D00_I', 'SHAPENUM', 'ST99_D00_']
---------------------------------------------------------------------------
<type 'exceptions.ValueError'> Traceback (most recent call last)
/home/lionel/Applications/Python/Scientifique/Basemap/examples/fillstates.py
in <module>()
87 if statenames[nshape] not in ['District of Columbia','Puerto
Rico']:
88 color = rgb2hex(colors[statenames[nshape]])
---> 89 p.fill(xx,yy,color,edgecolor=color)
90 # draw meridians and parallels.
91 m.drawparallels(nx.arange(25,65,20),labels=[1,0,0,0])
/usr/lib/python2.5/site-packages/matplotlib/pylab.py in fill(*args, **kwargs)
1858 hold(h)
1859 try:
-> 1860 ret = gca().fill(*args, **kwargs)
1861 draw_if_interactive()
1862 except:
/usr/lib/python2.5/site-packages/matplotlib/axes.py in fill(self, *args,
**kwargs)
4225
4226 patches = []
-> 4227 for poly in self._get_patches_for_fill(*args, **kwargs):
4228 self.add_patch( poly )
4229 patches.append( poly )
/usr/lib/python2.5/site-packages/matplotlib/axes.py in _grab_next_args(self,
*args, **kwargs)
426 if not is_string_like(remaining[2]):
427 raise ValueError, 'third arg must be a format
string'
--> 428 for seg in self._plot_3_args(remaining, **kwargs):
429 yield seg
430 remaining=[]
/usr/lib/python2.5/site-packages/matplotlib/axes.py in _plot_3_args(self,
tup3, **kwargs)
374 x, y, multicol = self._xy_from_xy(x, y)
375
--> 376 linestyle, marker, color = _process_plot_format(fmt)
377
378 def makeline(x, y):
/usr/lib/python2.5/site-packages/matplotlib/axes.py in
_process_plot_format(fmt)
151 else:
152 err = 'Unrecognized character %c in format string' % c
--> 153 raise ValueError, err
154
155 if linestyle is None and marker is None:
<type 'exceptions.ValueError'>: Unrecognized character # in format string
WARNING: Failure executing file: <fillstates.py>
########################################
The same problem occurs with another test, in this case the "Unrecognized
character" is "f" :-P
A solution is very welcome!
Thanks
--
Lionel Roubeyrie - [EMAIL PROTECTED]
Chargé d'études et de maintenance
LIMAIR - la Surveillance de l'Air en Limousin
http://www.limair.asso.fr
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users