savefig.edgecolor not working

I recently upgraded matplotlib 87.7 Mac OS X PPC 10.4

    > python 2.4 from sourceforge binary Using backend TkAgg
    > version 8.4

    > Whenever I save png plots using the toolbar save button or
    > explicitly, the edgecolor around the outside of the plot
    > is gray. I want it to be white.

    > I have the following in my rc file. savefig.edgecolor :
    > white # figure edgecolor when saving

    > I also tried this in my plotting program
    > rc('savefig',edgecolor = 'w')

    > and I also tried saving from the plotting program with
    > savefig("paths4test.png",edgecolor= 'w')

Strange -- I don't see that. In the example below, the rows of
[1,1,1,1] indicate white. What do you get?

In [5]: plot([1,2,3])
Out[5]: [<matplotlib.lines.Line2D instance at 0xb64dd74c>]

In [6]: savefig('test.png')

In [7]: im = imread('test.png')

In [8]: im.shape
Out[8]: (900, 1200, 4)

In [10]: im[0:5,0:10,:]
Out[10]:
array([[[ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.]],

       [[ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.]],

       [[ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.]],

       [[ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.]],

       [[ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.]]], dtype=float32)

I figured it out. It is saving the outside edge as transparent not gray. I was viewing the images in Apple's preview and it
displays transparent as gray (not checkerboard like photoshop or graphic converter).

Sorry.

···

On 21 Nov, 2006, at 12:21, John Hunter wrote:

    > I recently upgraded matplotlib 87.7 Mac OS X PPC 10.4
    > python 2.4 from sourceforge binary Using backend TkAgg
    > version 8.4

    > Whenever I save png plots using the toolbar save button or
    > explicitly, the edgecolor around the outside of the plot
    > is gray. I want it to be white.

    > I have the following in my rc file. savefig.edgecolor :
    > white # figure edgecolor when saving

    > I also tried this in my plotting program
    > rc('savefig',edgecolor = 'w')

    > and I also tried saving from the plotting program with
    > savefig("paths4test.png",edgecolor= 'w')

Strange -- I don't see that. In the example below, the rows of
[1,1,1,1] indicate white. What do you get?

In [5]: plot([1,2,3])
Out[5]: [<matplotlib.lines.Line2D instance at 0xb64dd74c>]

In [6]: savefig('test.png')

In [7]: im = imread('test.png')

In [8]: im.shape
Out[8]: (900, 1200, 4)

In [10]: im[0:5,0:10,:]
Out[10]:
array([[[ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.]],

       [[ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.]],

       [[ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.]],

       [[ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.]],

       [[ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.],
        [ 1., 1., 1., 1.]]], dtype=float32)

**********************************************************************
Samuel M. Smith Ph.D.
2966 Fort Hill Road
Eagle Mountain, Utah 84005-4108
801-768-2768 voice
801-768-2769 fax
**********************************************************************
"The greatest source of failure and unhappiness in the world is
giving up what we want most for what we want at the moment"
**********************************************************************