Customize SHADOW

Hello, I’m having two different results in the shadow of a graph. I develop the graph in a system with matplotlib 0.98.5.
When I put the code in other machine, with the same version of libpng, but with matplotlib 0.99.0, the shadow of the graph has changed to a real bad one.

In attachment, the two generated graphs. I wish that the graph’s shadown generated in 0.99 be the same of 0.98.5.

Well, see the attachment and you’ll understand.
thanks.

graph_0.98.5.png

graph_0.99.0.png

Can you provide the script that produces these graphs? I don't see any difference between 0.98.5 and 0.99.1 on the included pie_demo.py example. Which backend are you using?

Mike

Gewton Jhames wrote:

···

Hello, I'm having two different results in the shadow of a graph. I develop the graph in a system with matplotlib 0.98.5.
When I put the code in other machine, with the same version of libpng, but with matplotlib 0.99.0, the shadow of the graph has changed to a real bad one.

In attachment, the two generated graphs. I wish that the graph's shadown generated in 0.99 be the same of 0.98.5.

Well, see the attachment and you'll understand.
thanks.

------------------------------------------------------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
------------------------------------------------------------------------

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options
  
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

sorry, this is the script:

#!/usr/bin/python

-- coding: utf-8 --

from pylab import *

from matplotlib.pyplot import figure, show
from matplotlib.patches import Ellipse

import numpy as np

figure(1, figsize=(6,6), facecolor=‘#ffffff’)

ax = axes([0.1, 0.1, 0.8, 0.8])

labels = ‘label1’, ‘label2’

fracs = [40, 60]
colors = [‘#E3AB9C’, ‘#C6E9F8’]

explode=(0, 0.05)

plots = pie(fracs, explode=explode, labels=labels, colors=colors, autopct=‘%0.2f%%’, shadow=True)

plots[0][0].set_edgecolor(‘#E4471A’)
plots[0][1].set_edgecolor(‘#1AA8E4’)

title(‘Raining Hogs and Dogs’, bbox={‘facecolor’:‘0.8’, ‘pad’:5})

show()

···

On Wed, Sep 30, 2009 at 5:19 PM, Michael Droettboom <mdroe@…86…> wrote:

Can you provide the script that produces these graphs? I don’t see any difference between 0.98.5 and 0.99.1 on the included pie_demo.py example. Which backend are you using?

Mike

Gewton Jhames wrote:

Hello, I’m having two different results in the shadow of a graph. I develop the graph in a system with matplotlib 0.98.5.

When I put the code in other machine, with the same version of libpng, but with matplotlib 0.99.0, the shadow of the graph has changed to a real bad one.

In attachment, the two generated graphs. I wish that the graph’s shadown generated in 0.99 be the same of 0.98.5.

Well, see the attachment and you’ll understand.

thanks.





Come build with us! The BlackBerry® Developer Conference in SF, CA

is the only developer event you need to attend this year. Jumpstart your

developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now!

http://p.sf.net/sfu/devconf



Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Michael Droettboom

Science Software Branch

Operations and Engineering Division

Space Telescope Science Institute

Operated by AURA for NASA

I'm still not seeing a difference between 0.98.5 and 0.99.1 here. I further investigation of the code shows that there were no changes in how the shadow color is computed between these versions. Is it possible you're using an even earlier version? You can determine it using:

   >>> import matplotlib
   >>> matplotlib.__version__

Are there any other differences between the two installations, such as backend?

Cheers,
Mike

Gewton Jhames wrote:

···

sorry, this is the script:

#!/usr/bin/python
# -*- coding: utf-8 -*-
from pylab import *

from matplotlib.pyplot import figure, show
from matplotlib.patches import Ellipse
import numpy as np

figure(1, figsize=(6,6), facecolor='#ffffff')
ax = axes([0.1, 0.1, 0.8, 0.8])

labels = 'label1', 'label2'
fracs = [40, 60]
colors = ['#E3AB9C', '#C6E9F8']

explode=(0, 0.05)

plots = pie(fracs, explode=explode, labels=labels, colors=colors, autopct='%0.2f%%', shadow=True)
plots[0][0].set_edgecolor('#E4471A')
plots[0][1].set_edgecolor('#1AA8E4')
title('Raining Hogs and Dogs', bbox={'facecolor':'0.8', 'pad':5})

show()

On Wed, Sep 30, 2009 at 5:19 PM, Michael Droettboom <mdroe@...86... > <mailto:mdroe@…86…>> wrote:

    Can you provide the script that produces these graphs? I don't
    see any difference between 0.98.5 and 0.99.1 on the included
    pie_demo.py example. Which backend are you using?

    Mike

    Gewton Jhames wrote:

        Hello, I'm having two different results in the shadow of a
        graph. I develop the graph in a system with matplotlib 0.98.5.
        When I put the code in other machine, with the same version of
        libpng, but with matplotlib 0.99.0, the shadow of the graph
        has changed to a real bad one.

        In attachment, the two generated graphs. I wish that the
        graph's shadown generated in 0.99 be the same of 0.98.5.

        Well, see the attachment and you'll understand.
        thanks.

        ------------------------------------------------------------------------

        ------------------------------------------------------------------------

        ------------------------------------------------------------------------

        ------------------------------------------------------------------------------
        Come build with us! The BlackBerry&reg; Developer Conference
        in SF, CA
        is the only developer event you need to attend this year.
        Jumpstart your
        developing skills, take BlackBerry mobile applications to
        market and stay ahead of the curve. Join us from November
        9&#45;12, 2009. Register now&#33;
        http://p.sf.net/sfu/devconf
        ------------------------------------------------------------------------

        _______________________________________________
        Matplotlib-users mailing list
        Matplotlib-users@lists.sourceforge.net
        <mailto:Matplotlib-users@lists.sourceforge.net>
        matplotlib-users List Signup and Options
         
    -- Michael Droettboom
    Science Software Branch
    Operations and Engineering Division
    Space Telescope Science Institute
    Operated by AURA for NASA

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

Mike,

I think this maybe related with some changes in how alpha is set (this
happened sometime early this year I guess).

I think the issue here is, when the shadow patch is created, it sets
its facecolor with alpha=0.5., i.e., its _facecolor is something like
(r, g, b, 0.5). But, shadow._alpha = 1 still. And later when the
shadow is drawn, the alpha of the facecolor is simply overridden by
_alpha. Given that alpha=0.5 is intended, I think this is a bug. But
I'm not sure what is the preferred way to fix this.

I think this is a general issue of Patch classes. While the alpha
values can be set with facecolor and edgecolor, they are simply
overridden by _alpha. If this behavior is necessary and intended, we
should change the Shadow class to set its alpha correctly.

I, personally, want to have different alphas for the facecolor and
edgecolor, which cannot be done with the current approach. However, I
believe the current backend api itself (draw_path) does not allow
different alphas for edgecolor and facecolor, so it may best stick to
the current behavior.

Regards,

-JJ

···

On Wed, Sep 30, 2009 at 4:51 PM, Michael Droettboom <mdroe@...86...> wrote:

I'm still not seeing a difference between 0.98.5 and 0.99.1 here. I
further investigation of the code shows that there were no changes in
how the shadow color is computed between these versions. Is it possible
you're using an even earlier version? You can determine it using:

>>> import matplotlib
>>> matplotlib.__version__

Are there any other differences between the two installations, such as
backend?

Cheers,
Mike

Gewton Jhames wrote:

sorry, this is the script:

#!/usr/bin/python
# -*- coding: utf-8 -*-
from pylab import *

from matplotlib.pyplot import figure, show
from matplotlib.patches import Ellipse
import numpy as np

figure(1, figsize=(6,6), facecolor='#ffffff')
ax = axes([0.1, 0.1, 0.8, 0.8])

labels = 'label1', 'label2'
fracs = [40, 60]
colors = ['#E3AB9C', '#C6E9F8']

explode=(0, 0.05)

plots = pie(fracs, explode=explode, labels=labels, colors=colors,
autopct='%0.2f%%', shadow=True)
plots[0][0].set_edgecolor('#E4471A')
plots[0][1].set_edgecolor('#1AA8E4')
title('Raining Hogs and Dogs', bbox={'facecolor':'0.8', 'pad':5})

show()

On Wed, Sep 30, 2009 at 5:19 PM, Michael Droettboom <mdroe@...86... >> <mailto:mdroe@…86…>> wrote:

Can you provide the script that produces these graphs?  I don&#39;t
see any difference between 0\.98\.5 and 0\.99\.1 on the included
pie\_demo\.py example\.  Which backend are you using?

Mike

Gewton Jhames wrote:

    Hello, I&#39;m having two different results in the shadow of a
    graph\. I develop the graph in a system with matplotlib 0\.98\.5\.
    When I put the code in other machine, with the same version of
    libpng, but with matplotlib 0\.99\.0, the shadow of the graph
    has changed to a real bad one\.

    In attachment, the two generated graphs\. I wish that the
    graph&#39;s shadown generated in 0\.99 be the same of 0\.98\.5\.

    Well, see the attachment and you&#39;ll understand\.
    thanks\.

    \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-

    \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-

    \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-

    \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
    Come build with us\! The BlackBerry&amp;reg; Developer Conference
    in SF, CA
    is the only developer event you need to attend this year\.
    Jumpstart your
    developing skills, take BlackBerry mobile applications to
    market and stay ahead of the curve\. Join us from November
    9&amp;\#45;12, 2009\. Register now&amp;\#33;
    http://p.sf.net/sfu/devconf
    \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-

    \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
    Matplotlib\-users mailing list
    Matplotlib\-users@lists\.sourceforge\.net
    &lt;mailto:Matplotlib-users@...504...et&gt;
    https://lists.sourceforge.net/lists/listinfo/matplotlib-users

\-\-
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Yeah, alpha handling is a bit of a mess -- it should probably be revamped in light of the fact that most places now accept rgba. We just need to decide if there is a good solution that doesn't break backward compatibility, or whether we should just break compatibility (e.g. remove set/get_alpha) moving forward.

As for the current problem, I'll add a set_alpha call to the Shadow class.

Mike

Jae-Joon Lee wrote:

···

Mike,

I think this maybe related with some changes in how alpha is set (this
happened sometime early this year I guess).

I think the issue here is, when the shadow patch is created, it sets
its facecolor with alpha=0.5., i.e., its _facecolor is something like
(r, g, b, 0.5). But, shadow._alpha = 1 still. And later when the
shadow is drawn, the alpha of the facecolor is simply overridden by
_alpha. Given that alpha=0.5 is intended, I think this is a bug. But
I'm not sure what is the preferred way to fix this.

I think this is a general issue of Patch classes. While the alpha
values can be set with facecolor and edgecolor, they are simply
overridden by _alpha. If this behavior is necessary and intended, we
should change the Shadow class to set its alpha correctly.

I, personally, want to have different alphas for the facecolor and
edgecolor, which cannot be done with the current approach. However, I
believe the current backend api itself (draw_path) does not allow
different alphas for edgecolor and facecolor, so it may best stick to
the current behavior.

Regards,

-JJ

On Wed, Sep 30, 2009 at 4:51 PM, Michael Droettboom <mdroe@...86...> wrote:
  

I'm still not seeing a difference between 0.98.5 and 0.99.1 here. I
further investigation of the code shows that there were no changes in
how the shadow color is computed between these versions. Is it possible
you're using an even earlier version? You can determine it using:

  >>> import matplotlib
  >>> matplotlib.__version__

Are there any other differences between the two installations, such as
backend?

Cheers,
Mike

Gewton Jhames wrote:
    

sorry, this is the script:

#!/usr/bin/python
# -*- coding: utf-8 -*-
from pylab import *

from matplotlib.pyplot import figure, show
from matplotlib.patches import Ellipse
import numpy as np

figure(1, figsize=(6,6), facecolor='#ffffff')
ax = axes([0.1, 0.1, 0.8, 0.8])

labels = 'label1', 'label2'
fracs = [40, 60]
colors = ['#E3AB9C', '#C6E9F8']

explode=(0, 0.05)

plots = pie(fracs, explode=explode, labels=labels, colors=colors,
autopct='%0.2f%%', shadow=True)
plots[0][0].set_edgecolor('#E4471A')
plots[0][1].set_edgecolor('#1AA8E4')
title('Raining Hogs and Dogs', bbox={'facecolor':'0.8', 'pad':5})

show()

On Wed, Sep 30, 2009 at 5:19 PM, Michael Droettboom <mdroe@...86... >>> <mailto:mdroe@…86…>> wrote:

    Can you provide the script that produces these graphs? I don't
    see any difference between 0.98.5 and 0.99.1 on the included
    pie_demo.py example. Which backend are you using?

    Mike

    Gewton Jhames wrote:

        Hello, I'm having two different results in the shadow of a
        graph. I develop the graph in a system with matplotlib 0.98.5.
        When I put the code in other machine, with the same version of
        libpng, but with matplotlib 0.99.0, the shadow of the graph
        has changed to a real bad one.

        In attachment, the two generated graphs. I wish that the
        graph's shadown generated in 0.99 be the same of 0.98.5.

        Well, see the attachment and you'll understand.
        thanks.

        ------------------------------------------------------------------------

        ------------------------------------------------------------------------

        ------------------------------------------------------------------------

        ------------------------------------------------------------------------------
        Come build with us! The BlackBerry&reg; Developer Conference
        in SF, CA
        is the only developer event you need to attend this year.
        Jumpstart your
        developing skills, take BlackBerry mobile applications to
        market and stay ahead of the curve. Join us from November
        9&#45;12, 2009. Register now&#33;
        http://p.sf.net/sfu/devconf
        ------------------------------------------------------------------------

        _______________________________________________
        Matplotlib-users mailing list
        Matplotlib-users@lists.sourceforge.net
        <mailto:Matplotlib-users@lists.sourceforge.net>
        matplotlib-users List Signup and Options

    --
    Michael Droettboom
    Science Software Branch
    Operations and Engineering Division
    Space Telescope Science Institute
    Operated by AURA for NASA

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

OK, yesterday I was taking a look to the patch module. then, I went home.
Today, I’ll continue to look at these properties of alpha. because, yes, that’s what’s happening. one have alpha .5 and the other, 1.

Answering Mike’s question: the first system (the one I’ve wrote the code) is ubuntu 9.04, the other (with a newer version) is ubuntu server 8.04 LTS.Doesn’t make any difference.

···

On Thu, Oct 1, 2009 at 9:37 AM, Michael Droettboom <mdroe@…86…> wrote:

Yeah, alpha handling is a bit of a mess – it should probably be revamped in light of the fact that most places now accept rgba. We just need to decide if there is a good solution that doesn’t break backward compatibility, or whether we should just break compatibility (e.g. remove set/get_alpha) moving forward.

As for the current problem, I’ll add a set_alpha call to the Shadow class.

Mike

Jae-Joon Lee wrote:

Mike,

I think this maybe related with some changes in how alpha is set (this

happened sometime early this year I guess).

I think the issue here is, when the shadow patch is created, it sets

its facecolor with alpha=0.5., i.e., its _facecolor is something like

(r, g, b, 0.5). But, shadow._alpha = 1 still. And later when the

shadow is drawn, the alpha of the facecolor is simply overridden by

_alpha. Given that alpha=0.5 is intended, I think this is a bug. But

I’m not sure what is the preferred way to fix this.

I think this is a general issue of Patch classes. While the alpha

values can be set with facecolor and edgecolor, they are simply

overridden by _alpha. If this behavior is necessary and intended, we

should change the Shadow class to set its alpha correctly.

I, personally, want to have different alphas for the facecolor and

edgecolor, which cannot be done with the current approach. However, I

believe the current backend api itself (draw_path) does not allow

different alphas for edgecolor and facecolor, so it may best stick to

the current behavior.

Regards,

-JJ

On Wed, Sep 30, 2009 at 4:51 PM, Michael Droettboom <mdroe@…86…> wrote:

I’m still not seeing a difference between 0.98.5 and 0.99.1 here. I

further investigation of the code shows that there were no changes in

how the shadow color is computed between these versions. Is it possible

you’re using an even earlier version? You can determine it using:

import matplotlib

matplotlib.version

Are there any other differences between the two installations, such as

backend?

Cheers,

Mike

Gewton Jhames wrote:

sorry, this is the script:

#!/usr/bin/python

-- coding: utf-8 --

from pylab import *

from matplotlib.pyplot import figure, show

from matplotlib.patches import Ellipse

import numpy as np

figure(1, figsize=(6,6), facecolor=‘#ffffff’)

ax = axes([0.1, 0.1, 0.8, 0.8])

labels = ‘label1’, ‘label2’

fracs = [40, 60]

colors = [‘#E3AB9C’, ‘#C6E9F8’]

explode=(0, 0.05)

plots = pie(fracs, explode=explode, labels=labels, colors=colors,

autopct=‘%0.2f%%’, shadow=True)

plots[0][0].set_edgecolor(‘#E4471A’)

plots[0][1].set_edgecolor(‘#1AA8E4’)

title(‘Raining Hogs and Dogs’, bbox={‘facecolor’:‘0.8’, ‘pad’:5})

show()

On Wed, Sep 30, 2009 at 5:19 PM, Michael Droettboom <mdroe@…86… > > > > > > > > mailto:mdroe@...2527.....> wrote:

Can you provide the script that produces these graphs?  I don't

see any difference between 0.98.5 and 0.99.1 on the included

pie_demo.py example.  Which backend are you using?



Mike



Gewton Jhames wrote:



    Hello, I'm having two different results in the shadow of a

    graph. I develop the graph in a system with matplotlib 0.98.5.

    When I put the code in other machine, with the same version of

    libpng, but with matplotlib 0.99.0, the shadow of the graph

    has changed to a real bad one.



    In attachment, the two generated graphs. I wish that the

    graph's shadown generated in 0.99 be the same of 0.98.5.



    Well, see the attachment and you'll understand.

    thanks.



    ------------------------------------------------------------------------





    ------------------------------------------------------------------------



    ------------------------------------------------------------------------



    ------------------------------------------------------------------------------

    Come build with us! The BlackBerry&reg; Developer Conference

    in SF, CA

    is the only developer event you need to attend this year.

    Jumpstart your

    developing skills, take BlackBerry mobile applications to

    market and stay ahead of the curve. Join us from November

    9&#45;12, 2009. Register now&#33;

    [http://p.sf.net/sfu/devconf](http://p.sf.net/sfu/devconf)

    ------------------------------------------------------------------------



    _______________________________________________

    Matplotlib-users mailing list

    Matplotlib-users@lists.sourceforge.net

    <mailto:Matplotlib-users@lists.sourceforge.net>

    [https://lists.sourceforge.net/lists/listinfo/matplotlib-users](https://lists.sourceforge.net/lists/listinfo/matplotlib-users)







--

Michael Droettboom

Science Software Branch

Operations and Engineering Division

Space Telescope Science Institute

Operated by AURA for NASA

Michael Droettboom

Science Software Branch

Operations and Engineering Division

Space Telescope Science Institute

Operated by AURA for NASA


Come build with us! The BlackBerry® Developer Conference in SF, CA

is the only developer event you need to attend this year. Jumpstart your

developing skills, take BlackBerry mobile applications to market and stay

ahead of the curve. Join us from November 9-12, 2009. Register now!

http://p.sf.net/sfu/devconf


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Michael Droettboom

Science Software Branch

Operations and Engineering Division

Space Telescope Science Institute

Operated by AURA for NASA

“solved”.
In the system with the 0.99 version, in the file axes.py, class Axes, method pie, the shadow is created:
if shadow:
# make sure to add a shadow after the call to
# add_patch so the figure and transform props will be
# set
shad = mpatches.Shadow(w, -0.02, -0.02,
)
shad.set_zorder(0.9*w.get_zorder())
self.add_patch(shad)
having a look at matplotlib.patches.Shadow we can see a bit of keyword parameters. I passed this parameters when creating the Pie chart, and this method send the parameters when creating the shadow (piece of code above).
So, I modifed the signature of the method pie and the line that creates a shadow (shad = mpatches.Shadow(w, -0.02 … ).

I put “solved” quoted because was not a very beautiful soluction, but, I think was the best one for this case.

···

On Thu, Oct 1, 2009 at 10:13 AM, Gewton Jhames <gjhames@…287…> wrote:

OK, yesterday I was taking a look to the patch module. then, I went home.
Today, I’ll continue to look at these properties of alpha. because, yes, that’s what’s happening. one have alpha .5 and the other, 1.

Answering Mike’s question: the first system (the one I’ve wrote the code) is ubuntu 9.04, the other (with a newer version) is ubuntu server 8.04 LTS.Doesn’t make any difference.

On Thu, Oct 1, 2009 at 9:37 AM, Michael Droettboom <mdroe@…86…> wrote:

Yeah, alpha handling is a bit of a mess – it should probably be revamped in light of the fact that most places now accept rgba. We just need to decide if there is a good solution that doesn’t break backward compatibility, or whether we should just break compatibility (e.g. remove set/get_alpha) moving forward.

As for the current problem, I’ll add a set_alpha call to the Shadow class.

Mike

Jae-Joon Lee wrote:

Mike,

I think this maybe related with some changes in how alpha is set (this

happened sometime early this year I guess).

I think the issue here is, when the shadow patch is created, it sets

its facecolor with alpha=0.5., i.e., its _facecolor is something like

(r, g, b, 0.5). But, shadow._alpha = 1 still. And later when the

shadow is drawn, the alpha of the facecolor is simply overridden by

_alpha. Given that alpha=0.5 is intended, I think this is a bug. But

I’m not sure what is the preferred way to fix this.

I think this is a general issue of Patch classes. While the alpha

values can be set with facecolor and edgecolor, they are simply

overridden by _alpha. If this behavior is necessary and intended, we

should change the Shadow class to set its alpha correctly.

I, personally, want to have different alphas for the facecolor and

edgecolor, which cannot be done with the current approach. However, I

believe the current backend api itself (draw_path) does not allow

different alphas for edgecolor and facecolor, so it may best stick to

the current behavior.

Regards,

-JJ

On Wed, Sep 30, 2009 at 4:51 PM, Michael Droettboom <mdroe@…86…> wrote:

I’m still not seeing a difference between 0.98.5 and 0.99.1 here. I

further investigation of the code shows that there were no changes in

how the shadow color is computed between these versions. Is it possible

you’re using an even earlier version? You can determine it using:

import matplotlib

matplotlib.version

Are there any other differences between the two installations, such as

backend?

Cheers,

Mike

Gewton Jhames wrote:

sorry, this is the script:

#!/usr/bin/python

-- coding: utf-8 --

from pylab import *

from matplotlib.pyplot import figure, show

from matplotlib.patches import Ellipse

import numpy as np

figure(1, figsize=(6,6), facecolor=‘#ffffff’)

ax = axes([0.1, 0.1, 0.8, 0.8])

labels = ‘label1’, ‘label2’

fracs = [40, 60]

colors = [‘#E3AB9C’, ‘#C6E9F8’]

explode=(0, 0.05)

plots = pie(fracs, explode=explode, labels=labels, colors=colors,

autopct=‘%0.2f%%’, shadow=True)

plots[0][0].set_edgecolor(‘#E4471A’)

plots[0][1].set_edgecolor(‘#1AA8E4’)

title(‘Raining Hogs and Dogs’, bbox={‘facecolor’:‘0.8’, ‘pad’:5})

show()

On Wed, Sep 30, 2009 at 5:19 PM, Michael Droettboom <mdroe@…86… > > > > > > > > > > mailto:mdroe@...2527.....> wrote:

Can you provide the script that produces these graphs?  I don't

see any difference between 0.98.5 and 0.99.1 on the included

pie_demo.py example.  Which backend are you using?



Mike



Gewton Jhames wrote:



    Hello, I'm having two different results in the shadow of a

    graph. I develop the graph in a system with matplotlib 0.98.5.

    When I put the code in other machine, with the same version of

    libpng, but with matplotlib 0.99.0, the shadow of the graph

    has changed to a real bad one.



    In attachment, the two generated graphs. I wish that the

    graph's shadown generated in 0.99 be the same of 0.98.5.



    Well, see the attachment and you'll understand.

    thanks.



    ------------------------------------------------------------------------





    ------------------------------------------------------------------------



    ------------------------------------------------------------------------



    ------------------------------------------------------------------------------

    Come build with us! The BlackBerry&reg; Developer Conference

    in SF, CA

    is the only developer event you need to attend this year.

    Jumpstart your

    developing skills, take BlackBerry mobile applications to

    market and stay ahead of the curve. Join us from November

    9&#45;12, 2009. Register now&#33;

    [http://p.sf.net/sfu/devconf](http://p.sf.net/sfu/devconf)

    ------------------------------------------------------------------------



    _______________________________________________

    Matplotlib-users mailing list

    Matplotlib-users@lists.sourceforge.net

    <mailto:Matplotlib-users@lists.sourceforge.net>

    [https://lists.sourceforge.net/lists/listinfo/matplotlib-users](https://lists.sourceforge.net/lists/listinfo/matplotlib-users)







--

Michael Droettboom

Science Software Branch

Operations and Engineering Division

Space Telescope Science Institute

Operated by AURA for NASA

Michael Droettboom

Science Software Branch

Operations and Engineering Division

Space Telescope Science Institute

Operated by AURA for NASA


Come build with us! The BlackBerry® Developer Conference in SF, CA

is the only developer event you need to attend this year. Jumpstart your

developing skills, take BlackBerry mobile applications to market and stay

ahead of the curve. Join us from November 9-12, 2009. Register now!

http://p.sf.net/sfu/devconf


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Michael Droettboom

Science Software Branch

Operations and Engineering Division

Space Telescope Science Institute

Operated by AURA for NASA

I'm not quite clear on what changes you made. Can you provide a patch?

Also -- have you tested the change I committed here:

Cheers,
Mike

Gewton Jhames wrote:

···

"solved".
In the system with the 0.99 version, in the file axes.py, class Axes, method pie, the shadow is created:
            if shadow:
                # make sure to add a shadow after the call to
                # add_patch so the figure and transform props will be
                # set
                shad = mpatches.Shadow(w, -0.02, -0.02,
                              )
                shad.set_zorder(0.9*w.get_zorder())
                self.add_patch(shad)
having a look at matplotlib.patches.Shadow we can see a bit of keyword parameters. I passed this parameters when creating the Pie chart, and this method send the parameters when creating the shadow (piece of code above).
So, I modifed the signature of the method pie and the line that creates a shadow (/shad = mpatches.Shadow(w, -0.02 .../ ).

I put "solved" quoted because was not a very beautiful soluction, but, I think was the best one for this case.

On Thu, Oct 1, 2009 at 10:13 AM, Gewton Jhames <gjhames@...287... > <mailto:gjhames@…287…>> wrote:

    OK, yesterday I was taking a look to the patch module. then, I
    went home.
    Today, I'll continue to look at these properties of alpha.
    because, yes, that's what's happening. one have alpha .5 and the
    other, 1.
    Answering Mike's question: the first system (the one I've wrote
    the code) is ubuntu 9.04, the other (with a newer version) is
    ubuntu server 8.04 LTS.Doesn't make any difference.

    On Thu, Oct 1, 2009 at 9:37 AM, Michael Droettboom > <mdroe@...86... <mailto:mdroe@…86…>> wrote:

        Yeah, alpha handling is a bit of a mess -- it should probably
        be revamped in light of the fact that most places now accept
        rgba. We just need to decide if there is a good solution that
        doesn't break backward compatibility, or whether we should
        just break compatibility (e.g. remove set/get_alpha) moving
        forward.

        As for the current problem, I'll add a set_alpha call to the
        Shadow class.

        Mike

        Jae-Joon Lee wrote:

            Mike,

            I think this maybe related with some changes in how alpha
            is set (this
            happened sometime early this year I guess).

            I think the issue here is, when the shadow patch is
            created, it sets
            its facecolor with alpha=0.5., i.e., its _facecolor is
            something like
            (r, g, b, 0.5). But, shadow._alpha = 1 still. And later
            when the
            shadow is drawn, the alpha of the facecolor is simply
            overridden by
            _alpha. Given that alpha=0.5 is intended, I think this is
            a bug. But
            I'm not sure what is the preferred way to fix this.

            I think this is a general issue of Patch classes. While
            the alpha
            values can be set with facecolor and edgecolor, they are
            simply
            overridden by _alpha. If this behavior is necessary and
            intended, we
            should change the Shadow class to set its alpha correctly.

            I, personally, want to have different alphas for the
            facecolor and
            edgecolor, which cannot be done with the current approach.
            However, I
            believe the current backend api itself (draw_path) does
            not allow
            different alphas for edgecolor and facecolor, so it may
            best stick to
            the current behavior.

            Regards,

            -JJ

            On Wed, Sep 30, 2009 at 4:51 PM, Michael Droettboom > <mdroe@...86... <mailto:mdroe@…86…>> wrote:
             
                I'm still not seeing a difference between 0.98.5 and
                0.99.1 here. I
                further investigation of the code shows that there
                were no changes in
                how the shadow color is computed between these
                versions. Is it possible
                you're using an even earlier version? You can
                determine it using:

                 >>> import matplotlib
                 >>> matplotlib.__version__

                Are there any other differences between the two
                installations, such as
                backend?

                Cheers,
                Mike

                Gewton Jhames wrote:
                   
                    sorry, this is the script:

                    #!/usr/bin/python
                    # -*- coding: utf-8 -*-
                    from pylab import *

                    from matplotlib.pyplot import figure, show
                    from matplotlib.patches import Ellipse
                    import numpy as np

                    figure(1, figsize=(6,6), facecolor='#ffffff')
                    ax = axes([0.1, 0.1, 0.8, 0.8])

                    labels = 'label1', 'label2'
                    fracs = [40, 60]
                    colors = ['#E3AB9C', '#C6E9F8']

                    explode=(0, 0.05)

                    plots = pie(fracs, explode=explode, labels=labels,
                    colors=colors,
                    autopct='%0.2f%%', shadow=True)
                    plots[0][0].set_edgecolor('#E4471A')
                    plots[0][1].set_edgecolor('#1AA8E4')
                    title('Raining Hogs and Dogs',
                    bbox={'facecolor':'0.8', 'pad':5})

                    show()

                    On Wed, Sep 30, 2009 at 5:19 PM, Michael > Droettboom <mdroe@...86... <mailto:mdroe@…86…> > <mailto:mdroe@…86…>> > wrote:

                       Can you provide the script that produces these
                    graphs? I don't
                       see any difference between 0.98.5 and 0.99.1 on
                    the included
                       pie_demo.py example. Which backend are you using?

                       Mike

                       Gewton Jhames wrote:

                           Hello, I'm having two different results in
                    the shadow of a
                           graph. I develop the graph in a system with
                    matplotlib 0.98.5.
                           When I put the code in other machine, with
                    the same version of
                           libpng, but with matplotlib 0.99.0, the
                    shadow of the graph
                           has changed to a real bad one.

                           In attachment, the two generated graphs. I
                    wish that the
                           graph's shadown generated in 0.99 be the
                    same of 0.98.5.

                           Well, see the attachment and you'll understand.
                           thanks.

                                              ------------------------------------------------------------------------

                                              ------------------------------------------------------------------------

                                              ------------------------------------------------------------------------

                                              ------------------------------------------------------------------------------
                           Come build with us! The BlackBerry&reg;
                    Developer Conference
                           in SF, CA
                           is the only developer event you need to
                    attend this year.
                           Jumpstart your
                           developing skills, take BlackBerry mobile
                    applications to
                           market and stay ahead of the curve. Join us
                    from November
                           9&#45;12, 2009. Register now&#33;
                           http://p.sf.net/sfu/devconf
                                              ------------------------------------------------------------------------

                           _______________________________________________
                           Matplotlib-users mailing list
                           Matplotlib-users@lists.sourceforge.net
                    <mailto:Matplotlib-users@lists.sourceforge.net>
                                              <mailto:Matplotlib-users@lists.sourceforge.net
                    <mailto:Matplotlib-users@lists.sourceforge.net>>
                                              matplotlib-users List Signup and Options

                       --
                       Michael Droettboom
                       Science Software Branch
                       Operations and Engineering Division
                       Space Telescope Science Institute
                       Operated by AURA for NASA

                --
                Michael Droettboom
                Science Software Branch
                Operations and Engineering Division
                Space Telescope Science Institute
                Operated by AURA for NASA

                ------------------------------------------------------------------------------
                Come build with us! The BlackBerry&reg; Developer
                Conference in SF, CA
                is the only developer event you need to attend this
                year. Jumpstart your
                developing skills, take BlackBerry mobile applications
                to market and stay
                ahead of the curve. Join us from November 9&#45;12,
                2009. Register now&#33;
                http://p.sf.net/sfu/devconf
                _______________________________________________
                Matplotlib-users mailing list
                Matplotlib-users@lists.sourceforge.net
                <mailto:Matplotlib-users@lists.sourceforge.net>
                matplotlib-users List Signup and Options

        -- Michael Droettboom
        Science Software Branch
        Operations and Engineering Division
        Space Telescope Science Institute
        Operated by AURA for NASA

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

worked fine.

···

On Thu, Oct 1, 2009 at 1:10 PM, Michael Droettboom <mdroe@…86…> wrote:

I’m not quite clear on what changes you made. Can you provide a patch?

Also – have you tested the change I committed here:

http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/v0_99_maint/lib/matplotlib/patches.py?r1=7443&r2=7837&pathrev=7837

Cheers,

Mike

Gewton Jhames wrote:

“solved”.

In the system with the 0.99 version, in the file axes.py, class Axes, method pie, the shadow is created:

        if shadow:

            # make sure to add a shadow after the call to

            # add_patch so the figure and transform props will be

            # set

            shad = mpatches.Shadow(w, -0.02, -0.02,

                          )

            shad.set_zorder(0.9*w.get_zorder())

            self.add_patch(shad)

having a look at matplotlib.patches.Shadow we can see a bit of keyword parameters. I passed this parameters when creating the Pie chart, and this method send the parameters when creating the shadow (piece of code above).

So, I modifed the signature of the method pie and the line that creates a shadow (/shad = mpatches.Shadow(w, -0.02 …/ ).

I put “solved” quoted because was not a very beautiful soluction, but, I think was the best one for this case.

On Thu, Oct 1, 2009 at 10:13 AM, Gewton Jhames <gjhames@…287… mailto:gjhames@...287...> wrote:

OK, yesterday I was taking a look to the patch module. then, I

went home.

Today, I'll continue to look at these properties of alpha.

because, yes, that's what's happening. one have alpha .5 and the

other, 1.

Answering Mike's question: the first system (the one I've wrote

the code) is ubuntu 9.04, the other (with a newer version) is

ubuntu server 8.04 LTS.Doesn't make any difference.





On Thu, Oct 1, 2009 at 9:37 AM, Michael Droettboom > > <mdroe@...2662...... <mailto:mdroe@...86...>> wrote:



    Yeah, alpha handling is a bit of a mess -- it should probably

    be revamped in light of the fact that most places now accept

    rgba.  We just need to decide if there is a good solution that

    doesn't break backward compatibility, or whether we should

    just break compatibility (e.g. remove set/get_alpha) moving

    forward.



    As for the current problem, I'll add a set_alpha call to the

    Shadow class.



    Mike





    Jae-Joon Lee wrote:



        Mike,



        I think this maybe related with some changes in how alpha

        is set (this

        happened sometime early this year I guess).



        I think the issue here is, when the shadow patch is

        created, it sets

        its facecolor with alpha=0.5., i.e., its _facecolor is

        something like

        (r, g, b, 0.5). But, shadow._alpha = 1 still. And later

        when the

        shadow is drawn, the alpha of the facecolor is simply

        overridden by

        _alpha. Given that alpha=0.5 is intended, I think this is

        a bug. But

        I'm not sure what is the preferred way to fix this.



        I think this is a general issue of Patch classes. While

        the alpha

        values can be set with facecolor and edgecolor, they are

        simply

        overridden by _alpha. If this behavior is necessary and

        intended, we

        should change the Shadow class to set its alpha correctly.



        I, personally, want to have different alphas for the

        facecolor and

        edgecolor, which cannot be done with the current approach.

        However, I

        believe the current backend api itself (draw_path) does

        not allow

        different alphas for edgecolor and facecolor, so it may

        best stick to

        the current behavior.



        Regards,



        -JJ





        On Wed, Sep 30, 2009 at 4:51 PM, Michael Droettboom > > <mdroe@...86... <mailto:mdroe@...86...>> wrote:

        

            I'm still not seeing a difference between 0.98.5 and

            0.99.1 here.  I

            further investigation of the code shows that there

            were no changes in

            how the shadow color is computed between these

            versions.  Is it possible

            you're using an even earlier version?  You can

            determine it using:



             >>> import matplotlib

             >>> matplotlib.__version__



            Are there any other differences between the two

            installations, such as

            backend?



            Cheers,

            Mike



            Gewton Jhames wrote:

              

                sorry, this is the script:



                #!/usr/bin/python

                # -*- coding: utf-8 -*-

                from pylab import *



                from matplotlib.pyplot import figure, show

                from matplotlib.patches import Ellipse

                import numpy as np



                figure(1, figsize=(6,6), facecolor='#ffffff')

                ax = axes([0.1, 0.1, 0.8, 0.8])



                labels = 'label1', 'label2'

                fracs = [40, 60]

                colors = ['#E3AB9C', '#C6E9F8']



                explode=(0, 0.05)



                plots = pie(fracs, explode=explode, labels=labels,

                colors=colors,

                autopct='%0.2f%%', shadow=True)

                plots[0][0].set_edgecolor('#E4471A')

                plots[0][1].set_edgecolor('#1AA8E4')

                title('Raining Hogs and Dogs',

                bbox={'facecolor':'0.8', 'pad':5})





                show()





                On Wed, Sep 30, 2009 at 5:19 PM, Michael

                Droettboom <mdroe@...86... <mailto:mdroe@...86...>

<mailto:mdroe@…86… mailto:mdroe@...86...>>

                wrote:



                   Can you provide the script that produces these

                graphs?  I don't

                   see any difference between 0.98.5 and 0.99.1 on

                the included

                   pie_demo.py example.  Which backend are you using?



                   Mike



                   Gewton Jhames wrote:



                       Hello, I'm having two different results in

                the shadow of a

                       graph. I develop the graph in a system with

                matplotlib 0.98.5.

                       When I put the code in other machine, with

                the same version of

                       libpng, but with matplotlib 0.99.0, the

                shadow of the graph

                       has changed to a real bad one.



                       In attachment, the two generated graphs. I

                wish that the

                       graph's shadown generated in 0.99 be the

                same of 0.98.5.



                       Well, see the attachment and you'll understand.

                       thanks.



                                         ------------------------------------------------------------------------





                                         ------------------------------------------------------------------------



                                         ------------------------------------------------------------------------



                                         ------------------------------------------------------------------------------

                       Come build with us! The BlackBerry&reg;

                Developer Conference

                       in SF, CA

                       is the only developer event you need to

                attend this year.

                       Jumpstart your

                       developing skills, take BlackBerry mobile

                applications to

                       market and stay ahead of the curve. Join us

                from November

                       9&#45;12, 2009. Register now&#33;

                       [http://p.sf.net/sfu/devconf](http://p.sf.net/sfu/devconf)

                                         ------------------------------------------------------------------------



                       _______________________________________________

                       Matplotlib-users mailing list

                       Matplotlib-users@...1867...s.sourceforge.net

                <mailto:Matplotlib-users@...1735...sourceforge.net>

                                         <mailto:Matplotlib-users@lists.sourceforge.net

                <mailto:Matplotlib-users@...1735...sourceforge.net>>

                                         [https://lists.sourceforge.net/lists/listinfo/matplotlib-users](https://lists.sourceforge.net/lists/listinfo/matplotlib-users)







                   --

                   Michael Droettboom

                   Science Software Branch

                   Operations and Engineering Division

                   Space Telescope Science Institute

                   Operated by AURA for NASA





                    

            --

            Michael Droettboom

            Science Software Branch

            Operations and Engineering Division

            Space Telescope Science Institute

            Operated by AURA for NASA





            ------------------------------------------------------------------------------

            Come build with us! The BlackBerry&reg; Developer

            Conference in SF, CA

            is the only developer event you need to attend this

            year. Jumpstart your

            developing skills, take BlackBerry mobile applications

            to market and stay

            ahead of the curve. Join us from November 9&#45;12,

            2009. Register now&#33;

            [http://p.sf.net/sfu/devconf](http://p.sf.net/sfu/devconf)

            _______________________________________________

            Matplotlib-users mailing list

            Matplotlib-users@lists.sourceforge.net

            <mailto:Matplotlib-users@...1543...rge.net>

            [https://lists.sourceforge.net/lists/listinfo/matplotlib-users](https://lists.sourceforge.net/lists/listinfo/matplotlib-users)



              



    --        Michael Droettboom

    Science Software Branch

    Operations and Engineering Division

    Space Telescope Science Institute

    Operated by AURA for NASA

Michael Droettboom

Science Software Branch

Operations and Engineering Division

Space Telescope Science Institute

Operated by AURA for NASA

sorry, I forget the patch

very simple.no big deal.

patch.diff (838 Bytes)

···

On Thu, Oct 1, 2009 at 2:04 PM, Gewton Jhames <gjhames@…287…> wrote:

worked fine.

On Thu, Oct 1, 2009 at 1:10 PM, Michael Droettboom <mdroe@…86…> wrote:

I’m not quite clear on what changes you made. Can you provide a patch?

Also – have you tested the change I committed here:

http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/v0_99_maint/lib/matplotlib/patches.py?r1=7443&r2=7837&pathrev=7837

Cheers,

Mike

Gewton Jhames wrote:

“solved”.

In the system with the 0.99 version, in the file axes.py, class Axes, method pie, the shadow is created:

        if shadow:

            # make sure to add a shadow after the call to

            # add_patch so the figure and transform props will be

            # set

            shad = mpatches.Shadow(w, -0.02, -0.02,

                          )

            shad.set_zorder(0.9*w.get_zorder())

            self.add_patch(shad)

having a look at matplotlib.patches.Shadow we can see a bit of keyword parameters. I passed this parameters when creating the Pie chart, and this method send the parameters when creating the shadow (piece of code above).

So, I modifed the signature of the method pie and the line that creates a shadow (/shad = mpatches.Shadow(w, -0.02 …/ ).

I put “solved” quoted because was not a very beautiful soluction, but, I think was the best one for this case.

On Thu, Oct 1, 2009 at 10:13 AM, Gewton Jhames <gjhames@…287… mailto:gjhames@...287...> wrote:

OK, yesterday I was taking a look to the patch module. then, I

went home.

Today, I'll continue to look at these properties of alpha.

because, yes, that's what's happening. one have alpha .5 and the

other, 1.

Answering Mike's question: the first system (the one I've wrote

the code) is ubuntu 9.04, the other (with a newer version) is

ubuntu server 8.04 LTS.Doesn't make any difference.





On Thu, Oct 1, 2009 at 9:37 AM, Michael Droettboom > > > <mdroe@...2662...... <mailto:mdroe@...86...>> wrote:



    Yeah, alpha handling is a bit of a mess -- it should probably

    be revamped in light of the fact that most places now accept

    rgba.  We just need to decide if there is a good solution that

    doesn't break backward compatibility, or whether we should

    just break compatibility (e.g. remove set/get_alpha) moving

    forward.



    As for the current problem, I'll add a set_alpha call to the

    Shadow class.



    Mike





    Jae-Joon Lee wrote:



        Mike,



        I think this maybe related with some changes in how alpha

        is set (this

        happened sometime early this year I guess).



        I think the issue here is, when the shadow patch is

        created, it sets

        its facecolor with alpha=0.5., i.e., its _facecolor is

        something like

        (r, g, b, 0.5). But, shadow._alpha = 1 still. And later

        when the

        shadow is drawn, the alpha of the facecolor is simply

        overridden by

        _alpha. Given that alpha=0.5 is intended, I think this is

        a bug. But

        I'm not sure what is the preferred way to fix this.



        I think this is a general issue of Patch classes. While

        the alpha

        values can be set with facecolor and edgecolor, they are

        simply

        overridden by _alpha. If this behavior is necessary and

        intended, we

        should change the Shadow class to set its alpha correctly.



        I, personally, want to have different alphas for the

        facecolor and

        edgecolor, which cannot be done with the current approach.

        However, I

        believe the current backend api itself (draw_path) does

        not allow

        different alphas for edgecolor and facecolor, so it may

        best stick to

        the current behavior.



        Regards,



        -JJ





        On Wed, Sep 30, 2009 at 4:51 PM, Michael Droettboom > > > <mdroe@...86... <mailto:mdroe@...86...>> wrote:

        

            I'm still not seeing a difference between 0.98.5 and

            0.99.1 here.  I

            further investigation of the code shows that there

            were no changes in

            how the shadow color is computed between these

            versions.  Is it possible

            you're using an even earlier version?  You can

            determine it using:



             >>> import matplotlib

             >>> matplotlib.__version__



            Are there any other differences between the two

            installations, such as

            backend?



            Cheers,

            Mike



            Gewton Jhames wrote:

              

                sorry, this is the script:



                #!/usr/bin/python

                # -*- coding: utf-8 -*-

                from pylab import *



                from matplotlib.pyplot import figure, show

                from matplotlib.patches import Ellipse

                import numpy as np



                figure(1, figsize=(6,6), facecolor='#ffffff')

                ax = axes([0.1, 0.1, 0.8, 0.8])



                labels = 'label1', 'label2'

                fracs = [40, 60]

                colors = ['#E3AB9C', '#C6E9F8']



                explode=(0, 0.05)



                plots = pie(fracs, explode=explode, labels=labels,

                colors=colors,

                autopct='%0.2f%%', shadow=True)

                plots[0][0].set_edgecolor('#E4471A')

                plots[0][1].set_edgecolor('#1AA8E4')

                title('Raining Hogs and Dogs',

                bbox={'facecolor':'0.8', 'pad':5})





                show()





                On Wed, Sep 30, 2009 at 5:19 PM, Michael

                Droettboom <mdroe@...86... <mailto:mdroe@...86...>

<mailto:mdroe@…86… mailto:mdroe@...86...>>

                wrote:



                   Can you provide the script that produces these

                graphs?  I don't

                   see any difference between 0.98.5 and 0.99.1 on

                the included

                   pie_demo.py example.  Which backend are you using?



                   Mike



                   Gewton Jhames wrote:



                       Hello, I'm having two different results in

                the shadow of a

                       graph. I develop the graph in a system with

                matplotlib 0.98.5.

                       When I put the code in other machine, with

                the same version of

                       libpng, but with matplotlib 0.99.0, the

                shadow of the graph

                       has changed to a real bad one.



                       In attachment, the two generated graphs. I

                wish that the

                       graph's shadown generated in 0.99 be the

                same of 0.98.5.



                       Well, see the attachment and you'll understand.

                       thanks.



                                         ------------------------------------------------------------------------





                                         ------------------------------------------------------------------------



                                         ------------------------------------------------------------------------



                                         ------------------------------------------------------------------------------

                       Come build with us! The BlackBerry&reg;

                Developer Conference

                       in SF, CA

                       is the only developer event you need to

                attend this year.

                       Jumpstart your

                       developing skills, take BlackBerry mobile

                applications to

                       market and stay ahead of the curve. Join us

                from November

                       9&#45;12, 2009. Register now&#33;

                       [http://p.sf.net/sfu/devconf](http://p.sf.net/sfu/devconf)

                                         ------------------------------------------------------------------------



                       _______________________________________________

                       Matplotlib-users mailing list

                       Matplotlib-users@...1867...s.sourceforge.net

                <mailto:Matplotlib-users@...1735...sourceforge.net>

                                         <mailto:Matplotlib-users@lists.sourceforge.net

                <mailto:Matplotlib-users@...1735...sourceforge.net>>

                                         [https://lists.sourceforge.net/lists/listinfo/matplotlib-users](https://lists.sourceforge.net/lists/listinfo/matplotlib-users)







                   --

                   Michael Droettboom

                   Science Software Branch

                   Operations and Engineering Division

                   Space Telescope Science Institute

                   Operated by AURA for NASA





                    

            --

            Michael Droettboom

            Science Software Branch

            Operations and Engineering Division

            Space Telescope Science Institute

            Operated by AURA for NASA





            ------------------------------------------------------------------------------

            Come build with us! The BlackBerry&reg; Developer

            Conference in SF, CA

            is the only developer event you need to attend this

            year. Jumpstart your

            developing skills, take BlackBerry mobile applications

            to market and stay

            ahead of the curve. Join us from November 9&#45;12,

            2009. Register now&#33;

            [http://p.sf.net/sfu/devconf](http://p.sf.net/sfu/devconf)

            _______________________________________________

            Matplotlib-users mailing list

            Matplotlib-users@lists.sourceforge.net

            <mailto:Matplotlib-users@...1543...rge.net>

            [https://lists.sourceforge.net/lists/listinfo/matplotlib-users](https://lists.sourceforge.net/lists/listinfo/matplotlib-users)



              



    --        Michael Droettboom

    Science Software Branch

    Operations and Engineering Division

    Space Telescope Science Institute

    Operated by AURA for NASA

Michael Droettboom

Science Software Branch

Operations and Engineering Division

Space Telescope Science Institute

Operated by AURA for NASA