Mike, Jan,
The thread
http://www.mail-archive.com/[email protected]/msg08342.html
culminated in changeset r6106, which seemed to fix the immediate
problem, but in fact introduced a major bug: polar plotting was broken
for lines or patches with angles crossing zero.
The real solution to the original problem is not a change to mpl, but to
user code. In the example from the thread,
r = np.transpose(.1+np.arange ( 0 , 0.7 , 0.001))
theta = -4.5 * np.pi *r
freq = r*10e9
data = np.multiply(r,np.exp(1j*theta))
ax.plot(np.unwrap(angle(data)),abs(data)) # note added call to unwrap
the original problem was that the angle was jumping from near minus pi
to near plus pi, and the solution is to use the unwrap function, or
equivalent, to make the angle vary smoothly from start to finish, with
no jumps.
Any attempt to normalize the angles to a fixed range of length 2 pi
inside of mpl is sure to wreck valid user code; it merely moves the
trouble spot to a different angle.
In 6731 I reverted the normalization change from 6106, and also improved
the r-tick locations in cases where the actual r-data range is small.
Mike, of course I realized too late that I should have made the change
in the maintenance branch and used svnmerge to propagate it to the
trunk; should I just make the change manually in the branch?
Polar plotting could still use more work, but I doubt I will be able to
do much any time soon.
Eric
--
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel