From: Jesper L. <jes...@gm...> - 2008-11-26 23:13:20
|
Hi matplotlib users, The script below produces weird arrows when using numpy 1.2.1 and matplotlib trunk. When I reinstall numpy 1.2.0 instead it seems fine. I use the Agg backend. I am not sure where to start in tracking the bug down so I will just post the rather sparse information that I have. Please let me know if you need any further information from me. Best regards, Jesper import math import numpy.ma as ma import pylab as p a = ma.ones((10,10)) a[:2,:] = ma.masked a[:,9:] = ma.masked b = ma.array(-a) nx, ny = a.shape for i in range(nx): for j in range(ny): a[i,j] = a[i,j]*math.cos(i*j) b[i,j] = -b[i,j]*math.sin(i*j) print a p.quiver(a,b) p.grid(True) p.savefig('test1.png') |