On Wed, Nov 30, 2011 at 6:31 PM, Grigoris Maravelias <
gr.maravel...@gmail.com> wrote:

> **
> Well I did tried this but it didn't work out. It actually removes the
> black color from the color_cycle but the pie still prints it. Moreover I
> noticed that this color_cycle has 7 colors that repeats after the first 7
> so it won't do what I want. I will need to find another way to set the
> colors or just avoid the pie.
>
>
I guess I should atleast read the docstring for plt.pie before giving you
advice on how to use it. It looks like the default colors are hard coded
into the function (instead of using the color_cycle parameter).

The quickest way to create different colors is to pick them out from a
colormap. For example, the following gives decent results:

>>> colors = plt.cm.Set1(np.linspace(0,1,9))
>>> plt.pie(np.ones(9), colors=colors)

Of course, trying to get more (visually-differentiable) colors out of the
color map will be difficult.

Hope that helps,
-Tony
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to