one pixel white border : bug ?

Dear List,

when I'm saving a plot with the option facecolor='k',
around my image, there is still a one pixel white border.

How is it possible to remove this ?

try for example this very simple script:
(using )

import pylab as pt
from numpy import *

x = arange(0,10)
y = x**2
pt.plot(x,y)

pt.savefig('qq.png',facecolor='k')

Thanks in advance.

yves

···

--
                                                 (o o)
--------------------------------------------oOO--(_)--OOo-------
   Dr. Yves Revaz
   Laboratory of Astrophysics
   Ecole Polytechnique F�d�rale de Lausanne (EPFL)
   Observatoire de Sauverny Tel : ++ 41 22 379 24 28
   51. Ch. des Maillettes Fax : ++ 41 22 379 22 05
   1290 Sauverny e-mail : Yves.Revaz@...2003...
   SWITZERLAND Web : http://www.lunix.ch/revaz/
----------------------------------------------------------------

yves,

This might depend on the version of matplotlib and which backend you are using. I currently do not see this white line on my development build of mpl using the GTKAgg backend. What are you using?

Ben Root

···

On Thu, Sep 8, 2011 at 10:30 AM, Yves Revaz <yves.revaz@…2611…03…> wrote:

Dear List,

when I’m saving a plot with the option facecolor=‘k’,

around my image, there is still a one pixel white border.

How is it possible to remove this ?

try for example this very simple script:

(using )

import pylab as pt

from numpy import *

x = arange(0,10)

y = x**2

pt.plot(x,y)

pt.savefig(‘qq.png’,facecolor=‘k’)

Thanks in advance.

yves

Dear List,

      when I'm saving a plot with the option facecolor='k',

      around my image, there is still a one pixel white border.



      How is it possible to remove this ?



      try for example this very simple script:

      (using )



      import pylab as pt

      from numpy import *



      x = arange(0,10)

      y = x**2

      pt.plot(x,y)



      pt.savefig('qq.png',facecolor='k')





      Thanks in advance.



      yves
      yves,



      This might depend on the version of matplotlib and which

backend you are using. I currently do not see this white line
on my development build of mpl using the GTKAgg backend. What
are you using?

Hi Ben,

Thanks for you reply.

I'm using :

import matplotlib

  >>> matplotlib.__version__

  '1.0rc1'

  with the GTKAgg backend.

  I join a zoom of a corner of the image to show that

  there is one white line and a second gray one.

  I tried different backend, with some of them (XV, GTKCairo),

  the white line disapears but in all cases, the gray line is

present .
Do you really have nothing like that ?
Thanks,
yves

zoom.png

···

:frowning:

                                                -- (o o)
--------------------------------------------oOO--(_)--OOo-------
Dr. Yves Revaz
Laboratory of Astrophysics
Ecole Polytechnique Fédérale de Lausanne (EPFL)
Observatoire de Sauverny Tel : ++ 41 22 379 24 28
51. Ch. des Maillettes Fax : ++ 41 22 379 22 05
1290 Sauverny e-mail : SWITZERLAND Web : ----------------------------------------------------------------

Yves.Revaz@…2003…http://www.lunix.ch/revaz/

Dear List,

      when I'm saving a plot with the option facecolor='k',

      around my image, there is still a one pixel white border.



      How is it possible to remove this ?



      try for example this very simple script:

      (using )



      import pylab as pt

      from numpy import *



      x = arange(0,10)

      y = x**2

      pt.plot(x,y)



      pt.savefig('qq.png',facecolor='k')





      Thanks in advance.



      yves
      yves,



      This might depend on the version of matplotlib and which

backend you are using. I currently do not see this white line
on my development build of mpl using the GTKAgg backend. What
are you using?

Hi Ben,

Thanks for you reply.



I'm using :

import matplotlib

  >>> matplotlib.__version__

  '1.0rc1'

That version is over a year old. Since then, I know that some “off-by-one” pixel bugs have been fixed.

  with the GTKAgg backend.

  I join a zoom of a corner of the image to show that

  there is one white line and a second gray one.



  I tried different backend, with some of them (XV, GTKCairo),

  the white line disapears but in all cases, the gray line is

present :frowning: .

  Do you really have nothing like that ?

No, not in the latest development version, but I haven’t checked for a gray line. Then again, that may be dependent upon the graphics viewer.

You could try installing v1.0.1 now, or wait a bit for the upcoming v1.1 release.

I hope this helps!
Ben Root

···

On Fri, Sep 9, 2011 at 3:49 AM, Yves Revaz <yves.revaz@…3773…3…> wrote:

On 09/08/2011 06:09 PM, Benjamin Root wrote:

    On Thu, Sep 8, 2011 at 10:30 AM, Yves > > Revaz <yves.revaz@...2003...> > >         wrote:

Ben and Yves,

Might this be behavior defined in the matplotlibrc file?

In [21]: import matplotlib as mpl
In [22]: mpl.rcParams['figure.edgecolor']
Out[22]: 'w'

-paul

···

On Fri, Sep 9, 2011 at 9:37 AM, Benjamin Root <ben.root@...1304...> wrote:

On Fri, Sep 9, 2011 at 3:49 AM, Yves Revaz <yves.revaz@...2003...> wrote:

On 09/08/2011 06:09 PM, Benjamin Root wrote:

On Thu, Sep 8, 2011 at 10:30 AM, Yves Revaz <yves.revaz@...2003...> wrote:

Dear List,

when I'm saving a plot with the option facecolor='k',
around my image, there is still a one pixel white border.

How is it possible to remove this ?

try for example this very simple script:
(using )

import pylab as pt
from numpy import *

x = arange(0,10)
y = x**2
pt.plot(x,y)

pt.savefig('qq.png',facecolor='k')

Thanks in advance.

yves

yves,

This might depend on the version of matplotlib and which backend you are
using. I currently do not see this white line on my development build of
mpl using the GTKAgg backend. What are you using?

Hi Ben,

Thanks for you reply.

I'm using :

>>> import matplotlib
>>> matplotlib.__version__
'1.0rc1'

That version is over a year old. Since then, I know that some "off-by-one"
pixel bugs have been fixed.

with the GTKAgg backend.
I join a zoom of a corner of the image to show that
there is one white line and a second gray one.

I tried different backend, with some of them (XV, GTKCairo),
the white line disapears but in all cases, the gray line is present :frowning: .

Do you really have nothing like that ?

No, not in the latest development version, but I haven't checked for a gray
line. Then again, that may be dependent upon the graphics viewer.

You could try installing v1.0.1 now, or wait a bit for the upcoming v1.1
release.

I hope this helps!
Ben Root

------------------------------------------------------------------------------
Why Cloud-Based Security and Archiving Make Sense
Osterman Research conducted this study that outlines how and why cloud
computing security and archiving is rapidly being adopted across the IT
space for its ease of implementation, lower cost, and increased
reliability. Learn more. http://www.accelacomm.com/jaw/sfnl/114/51425301/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users