Nick,

svn 2635 has a fix for this bug.

Eric

Nick Fotopoulos wrote:
> Dear matplotlib-users,
> 
> I'd like to report a bug in Polygon, which is crashing with an  
> unhelpful error message where an exception would be appropriate.  The  
> problem occurs when you feed Polygon an Nx2 array instead of an N- 
> length list of 2-tuples.  This is on my PPC OSX system, with  
> everything freshly checked out from SVN (should the matplotlib  
> version still be 0.87.4?).
> 
> Versions:
> In [152]: numpy.__version__
> Out[152]: '1.1.2881'
> In [154]: matplotlib.__version__
> Out[154]: '0.87.4'
> 
> 
> Code:
> import pylab, numpy
> 
> theta = numpy.pi/4*numpy.arange(9,dtype=float)
> 
> x = numpy.cos(theta)
> y = numpy.sin(theta)
> 
> # The following line works
> #p = pylab.Polygon(zip(x,y))
> 
> # The following line causes a crash
> p = pylab.Polygon(numpy.vstack((x,y)).T)
> 
> ax = pylab.subplot(111)
> ax.add_patch(p)
> pylab.show()


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to