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] 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] 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 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] 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] 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

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 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 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

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

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

2010-06-10 Thread Jason Grout
Hi all, If you zoom in to the origin in the following figure: fig = plt.figure() ax = fig.add_subplot(1,1,1, aspect='equal') ax.plot([-1,1],[-1,1], color='blue') ax.set_xlim(-1.1,1.1) ax.set_ylim(-1.1,1.1) ax.spines['left'].set_position('zero') ax.spines['right'].set_color('none') ax.spines['bott