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.
Thanks though for the help!
Regards
Grigoris
On 11/30/2011 06:09 PM, Tony Yu wrote:
On Wed, Nov 30, 2011 at 10:34 AM, Grigoris Maravelias
<gr.maravel...@gmail.com <mailto:gr.maravel...@gmail.com>> wrote:
Hello list!
I have a question regarding the colors of the pie diagram of
matplotlib. When no colors are assigned then the pie function
automatically selects some colors, like the example image I have
attached. But in this case the black color covers the text. How
can we avoid this?Is there an easy (perhaps?) way to exclude a color?
I don't really use pie charts, but I think it just uses the default
color cycle. This can be altered by changing the rcParams:
>>> import matplotlib.pyplot as plt
>>> plt.rcParams['axes.color_cycle'].remove('k')
The color_cycle parameter is just a python list, so I use list.remove
to remove black (which is the letter 'k' since 'b' is blue). There are
other ways of setting rcParams, as detailed in the help files
<http://matplotlib.sourceforge.net/users/customizing.html> (Note that
`rc` and `rcParams` is in both matplotlib.pyplot and the main
matplotlib package).
Best,
-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