pie chart lables

Hi all,

I am trying to create pie chart using matplotlib. I have 9 items to be plotted in the chart. sometimes the length of the lable appears to be long which scatteres them in the chart. Is there any way to create a link/line between label and its pie to make the represenation meaningfull and obvious ?
The other thing is, pie with small area is not being colored. These doesn’t even have outline to make them look part of pie. Any idea, what’s going on there ?

I am attaching pie chart figure and the code snippet.

df_status.png

···

================================
figure(figsize=(9,8),dpi=200)
ax = axes([0.1, 0.1, 0.8, 0.8])
labels = df_status_list
fracs = df_count_list

 colors = ('#008000', '#3D0099', 'r', '#CE80FF', 'm', 'y',

‘r’,‘b’)

title('df Status\n', fontsize=16)   
patches = pie(fracs, labels=labels, labeldistance=1.3, autopct='%1.1f%%', shadow=True,colors=colors)

savefig("df_status.png")

================================

Any help will be appreciated.

Thanks,
js

Someone recently posted a patch to use left or right alignment of text
depending on which side of he pie you are on. I think Michael was
going to commit that if noone objected, and it seems like a good idea
to me. That will probably help. The main poblem I see problem in
your example is the labeldistance is too large, try 1.1 or 0.9 and see
if that helps.

JDH

···

On Fri, Jun 13, 2008 at 5:24 AM, Jatinder Syali <jatinderss_in@...9...> wrote:

Hi all,

I am trying to create pie chart using matplotlib. I have 9 items to be
plotted in the chart. sometimes the length of the lable appears to be long
which scatteres them in the chart. Is there any way to create a link/line
between label and its pie to make the represenation meaningfull and obvi