On Wed, Nov 30, 2011 at 10:34 AM, Grigoris Maravelias <gr.maravelias@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 (Note that `rc` and `rcParams` is in both matplotlib.pyplot and the main matplotlib package).