Re: [matplotlib-devel] Plots shifted up or to the left a pixel or so

2010-06-11 Thread Michael Droettboom
The problem is the default quantizing of all rectilinear axis-aligned lines (which includes the spines). They are "rounded" to the nearest center pixels in order to make them less fuzzy. However, there's actually a bug in the quantizer that your example illustrates. Since the spine lines in y

Re: [matplotlib-devel] Plots shifted up or to the left a pixel or so

2010-06-11 Thread Michael Droettboom
On 06/11/2010 09:46 AM, Michael Droettboom wrote: > However, there's actually a bug in the quantizer that your example > illustrates. Since the spine lines in your example have a stroke width > of 4 pixels, they should actually be rounded to the nearest pixel edge, > not nearest center pixel. So

[matplotlib-devel] Bug plotting very small values

2010-06-11 Thread João Luís Silva
Hi, Plotting some very small values (~1E-306) will break mpl with the error: File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py", line 154, in draw_text self._renderer.draw_text_image(font.get_image(), int(x), int(y) + 1, angle, gc) OverflowError: cannot convert

Re: [matplotlib-devel] Plots shifted up or to the left a pixel or so

2010-06-11 Thread jason-sage
On 6/11/10 9:44 AM, Michael Droettboom wrote: > On 06/11/2010 09:46 AM, Michael Droettboom wrote: > >> However, there's actually a bug in the quantizer that your example >> illustrates. Since the spine lines in your example have a stroke width >> of 4 pixels, they should actually be rounded to

[matplotlib-devel] build_windowing option

2010-06-11 Thread Jason Grout
I notice in setupext.py, a default is set for the setup.cfg build_windowing option, but it doesn't look like anything is ever actually read in from the configuration file to override the default. Also, the build_windowing option is not in the setup.cfg.template file. Is all of this intentiona

Re: [matplotlib-devel] Plots shifted up or to the left a pixel or so

2010-06-11 Thread jason-sage
On 6/11/10 9:44 AM, Michael Droettboom wrote: > On 06/11/2010 09:46 AM, Michael Droettboom wrote: > >> However, there's actually a bug in the quantizer that your example >> illustrates. Since the spine lines in your example have a stroke width >> of 4 pixels, they should actually be rounded to

Re: [matplotlib-devel] Plots shifted up or to the left a pixel or so

2010-06-11 Thread Michael Droettboom
On 06/11/2010 01:31 PM, jason-s...@creativetrax.com wrote: > On 6/11/10 9:44 AM, Michael Droettboom wrote: > >> On 06/11/2010 09:46 AM, Michael Droettboom wrote: >> >> >>> However, there's actually a bug in the quantizer that your example >>> illustrates. Since the spine lines in your ex

[matplotlib-devel] Qt4 backend crashes when rcParam['toolbar'] is None

2010-06-11 Thread Michael Droettboom
The Qt4 backend crashes with a Segmentation Fault when no toolbar is requested. For example: from matplotlib import pyplot as plt from matplotlib import rcParams rcParams['toolbar'] = 'None' fig=plt.figure() plt.show() I have attached a possible patch, but since I've never really touched th

Re: [matplotlib-devel] Plots shifted up or to the left a pixel or so

2010-06-11 Thread Eric Firing
On 06/11/2010 07:39 AM, Michael Droettboom wrote: > On 06/11/2010 01:31 PM, jason-s...@creativetrax.com wrote: >> On 6/11/10 9:44 AM, Michael Droettboom wrote: >> >>> On 06/11/2010 09:46 AM, Michael Droettboom wrote: >>> >>> However, there's actually a bug in the quantizer that your example >>

Re: [matplotlib-devel] Qt4 backend crashes when rcParam['toolbar'] is None

2010-06-11 Thread Eric Firing
On 06/11/2010 07:44 AM, Michael Droettboom wrote: > The Qt4 backend crashes with a Segmentation Fault when no toolbar is > requested. For example: Mike, Have the other backends been tested for the same problem? Eric > > from matplotlib import pyplot as plt > from matplotlib import rcParams > rc

Re: [matplotlib-devel] Plots shifted up or to the left a pixel or so

2010-06-11 Thread Michael Droettboom
On 06/11/2010 01:54 PM, Eric Firing wrote: > On 06/11/2010 07:39 AM, Michael Droettboom wrote: > >> On 06/11/2010 01:31 PM, jason-s...@creativetrax.com wrote: >> >>> On 6/11/10 9:44 AM, Michael Droettboom wrote: >>> >>> On 06/11/2010 09:46 AM, Michael Droettboom wrote: >

Re: [matplotlib-devel] Qt4 backend crashes when rcParam['toolbar'] is None

2010-06-11 Thread Michael Droettboom
Wx, Gtk, Tk all work for me. Couldn't test Qt "classic" as I don't have pyqt 3.x installed on my system. Mike On 06/11/2010 01:56 PM, Eric Firing wrote: > On 06/11/2010 07:44 AM, Michael Droettboom wrote: > >> The Qt4 backend crashes with a Segmentation Fault when no toolbar is >> requested

Re: [matplotlib-devel] Plots shifted up or to the left a pixel or so

2010-06-11 Thread jason-sage
On 6/11/10 1:02 PM, Michael Droettboom wrote: > >> It appears that the difficulty is that quantization is exposed at the >> python level only for collections, via iter_segments. >> >> > Sort of. Lines (but none of the other artists) follow what is set by > "set_snap" (the use of two terms fo

Re: [matplotlib-devel] Plots shifted up or to the left a pixel or so

2010-06-11 Thread Michael Droettboom
On 06/11/2010 02:38 PM, jason-s...@creativetrax.com wrote: > On 6/11/10 1:02 PM, Michael Droettboom wrote: > >> >>> It appears that the difficulty is that quantization is exposed at the >>> python level only for collections, via iter_segments. >>> >>> >>> >> Sort of. Lines (but n

Re: [matplotlib-devel] Qt4 backend crashes when rcParam['toolbar'] is None

2010-06-11 Thread Eric Firing
On 06/11/2010 08:03 AM, Michael Droettboom wrote: > Wx, Gtk, Tk all work for me. Couldn't test Qt "classic" as I don't have > pyqt 3.x installed on my system. I just now installed pyqt3 (after some thrashing around--it turns out one needs the python-qt-dev package on ubuntu), and verified that q

[matplotlib-devel] repeated calls to show() are now OK?

2010-06-11 Thread Eric Firing
It seems that every couple of weeks, someone understandably asks why one can't call show() more than once in a script or session. However, I think that at least on all non-Mac backends, it now works. I have tested it (using ipython, with no threading) on: qtagg, qt4agg, wx, wxagg, gtk, gtkagg

Re: [matplotlib-devel] Plots shifted up or to the left a pixel or so

2010-06-11 Thread Eric Firing
On 06/11/2010 09:09 AM, Michael Droettboom wrote: > On 06/11/2010 02:38 PM, jason-s...@creativetrax.com wrote: >> On 6/11/10 1:02 PM, Michael Droettboom wrote: >> >>> It appears that the difficulty is that quantization is exposed at the python level only for collections, via iter_segments

Re: [matplotlib-devel] repeated calls to show() are now OK?

2010-06-11 Thread John Hunter
On Fri, Jun 11, 2010 at 2:56 PM, Eric Firing wrote: > Is it time for us to change our documentation, and officially support > the use of multiple calls to show()?  If we can do it, I think it would > remove one of the main stumbling blocks for newcomers. I don't have a problem allowing/supportin

Re: [matplotlib-devel] repeated calls to show() are now OK?

2010-06-11 Thread Eric Firing
On 06/11/2010 10:09 AM, John Hunter wrote: > On Fri, Jun 11, 2010 at 2:56 PM, Eric Firing wrote: > >> Is it time for us to change our documentation, and officially support >> the use of multiple calls to show()? If we can do it, I think it would >> remove one of the main stumbling blocks for newc