Unfortunately, there is no simple way, as MPL does not support gradient yet.
There is a hard way though, that you create a gradient image by
yourself and clip it with the appropriate path.
I guess, the easiest way for a normal user is to export the figure as
the SVG format and put some gradient using inkscape, or similar tools.

Regards,

-JJ


On Wed, Sep 30, 2009 at 12:21 PM, Gewton Jhames <gjha...@gmail.com> wrote:
> Hello everyone,
> I wish a simple sample of creating a pie graph filled with a gradient from
> blue(#98D0D8) to a lighter blue(#BAE5EB).
> Here's the code (I got from the samples):
>
> from pylab import *
>
>
>
> # make a square figure and axes
> figure(1, figsize=(6,6))
>
>
> ax = axes([0.1, 0.1, 0.8, 0.8])
>
>
>
> labels = 'Frogs', 'Hogs', 'Dogs', 'Logs'
>
>
> fracs = [15,30,45, 10]
>
>
>
> explode=(0, 0.05, 0, 0)
>
>
> pie(fracs, explode=explode, labels=labels, autopct='%1.1f%%', shadow=True)
>
>
> title('Raining Hogs and Dogs', bbox={'facecolor':'0.8', 'pad':5})
>
>
>
> show()
>
> 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
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>

------------------------------------------------------------------------------
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to