|
From: Ryan S. <ry...@ze...> - 2006-03-10 15:14:02
|
Greetings,
Sorry, I am new to matplotlib(0.86.1). I modifed the sample pie chart
below to report disk quota usage. But how do I specify colors? (blue
for free, and red for used)
-----------
from pylab import *
figure(1, figsize=(4,4))
ax = axes([0.1, 0.1,0.8,0.8])
labels = 'Free', 'Used'
fracs = [15,85]
figure(1)
pie(fracs, labels=labels)
figure(2, figsize=(8,8))
explode=(0.05,0)
pie(fracs, explode=explode, labels=labels, autopct='%1.1f%%', shadow=True)
savefig('pie_demo')
show()
regards,
Ryan
|