On Wed, Nov 30, 2011 at 10:34 AM, Grigoris Maravelias <
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

Reply via email to