I seem to be getting some corner artifacts when using *Agg that I haven't seen before. Anyone else seeing something strange and any idea why? import numpy from pylab import figure, show t = numpy.arange(0.0, 1.0, 0.1) s = numpy.ones(len(t), dtype=numpy.float_) s[1::2] = 0. fig = figure() ax = fig.add_subplot(111) ax.plot(t, s, '-', lw=2) ax.set_ylim(-.5, 1.5) show()
Works for me, python 2.4, matplotlib 0.90.0, .matplotlibrc: numerix: numpy backend: GTKAgg even with lw=20 John Hunter wrote: > I seem to be getting some corner artifacts when using *Agg that I > haven't seen before. Anyone else seeing something strange and any > idea why? > > import numpy > > from pylab import figure, show > > t = numpy.arange(0.0, 1.0, 0.1) > s = numpy.ones(len(t), dtype=numpy.float_) > s[1::2] = 0. > > fig = figure() > ax = fig.add_subplot(111) > ax.plot(t, s, '-', lw=2) > ax.set_ylim(-.5, 1.5) > show() > -- Tom Holroyd, Ph.D. "The fundamentally misconceived nature versus nurture debate should be abandoned: child development is inextricably both." -- Louann Brizendine
John Hunter wrote: > I seem to be getting some corner artifacts when using *Agg that I > haven't seen before. Anyone else seeing something strange and any > idea why? > > import numpy > > from pylab import figure, show > > t = numpy.arange(0.0, 1.0, 0.1) > s = numpy.ones(len(t), dtype=numpy.float_) > s[1::2] = 0. > > fig = figure() > ax = fig.add_subplot(111) > ax.plot(t, s, '-', lw=2) > ax.set_ylim(-.5, 1.5) > show() Confirmed with GTKAgg on OS X, latest svn (but not with 0.90). No idea why though. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-124 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
On Wed, May 23, 2007 at 03:15:45PM -0500, John Hunter wrote: > I seem to be getting some corner artifacts when using *Agg that I > haven't seen before. Anyone else seeing something strange and any > idea why? I started seeing them with the QtAgg backend when I updated the svn version I was using. That was about 2 weeks ago, and the previous version was about 6 weeks old, at that point. Glen
On 5/23/07, John Hunter <jd...@gm...> wrote: > I seem to be getting some corner artifacts when using *Agg that I > haven't seen before. Anyone else seeing something strange and any > idea why? Glad you wrote this, I was about to. I noticed them only recently, and they're driving me nuts. They aren't just corners, they have to do with the overlap of two lines and Agg messing something up when thick lines overlap. Here's an example that illustrates it more easily (that's how I ran into it): import numpy as N from pylab import figure, show t = N.linspace(-1.0, 1.0, 2001) s = N.exp(-300*N.abs(t)) fig = figure() ax = fig.add_subplot(111) ax.plot(t, s, '-', lw=2) show() ### Plot this, then click on the little zoom tool (the cross) and do a horizontal right-mouse motion to widen/tighten the exponential. You'll see the white artifact move across the region of overlap of the vertical lines. Fortunately for me, the generated EPS don't have the problem (it's a pure Agg bug), so I'm OK for the final output. But it's really annoying on screen. My plots have tons of nearly retracing lines on them, and they look atrociously bad now. Cheers, f
On 5/23/07, Fernando Perez <fpe...@gm...> wrote: > Fortunately for me, the generated EPS don't have the problem (it's a > pure Agg bug), so I'm OK for the final output. But it's really > annoying on screen. My plots have tons of nearly retracing lines on > them, and they look atrociously bad now. Apparently I broke something when I added the support for general polygon clipping to agg. Unfortunately, this code was pretty hairy so it will take me a little time to fix. Those of you who are annoyed by this should simply revert your local copy to > svn up src/_backend_agg.h -r3254 > svn up src/_backend_agg.cpp -r3254 and hopefully I can find and fix the problem in the main line ASAP. JDH
On 5/24/07, John Hunter <jd...@gm...> wrote: > > svn up src/_backend_agg.h -r3254 > > svn up src/_backend_agg.cpp -r3254 Oops, make that revision 3092
On 5/24/07, John Hunter <jd...@gm...> wrote: > On 5/24/07, John Hunter <jd...@gm...> wrote: > > > > svn up src/_backend_agg.h -r3254 > > > svn up src/_backend_agg.cpp -r3254 > > Oops, make that revision 3092 OK, just ignore me :-) It turned out to be an easy fix. I was experimenting with even-odd and non-zero filling rules when I was working on polygon clipping and left a setting turned on that I did not mean to. Problem fixed in svn. JDH
On 5/24/07, John Hunter <jd...@gm...> wrote: > It turned out to be an easy fix. I was experimenting with even-odd > and non-zero filling rules when I was working on polygon clipping and > left a setting turned on that I did not mean to. Problem fixed in > svn. Great, thanks. Works perfectly now. Cheers, f