From: Fredrik Pihl <pi.arctan@gm...> - 2010-05-24 14:04:58
My boss asked me to provide a list of the source-code distribution per
folder in a project.
Using cloc http://cloc.sourceforge.net/ and some python give me all the numbers.
The problem comes when using pie to display the result, since many folders have
a small distribution, labels are printed ontop of each other making it
Using linux-2.6.34 kernel as an example:
from pylab import *
dirs=['arch', 'block', 'crypto', 'Documentation', 'drivers',
'firmware', 'fs', 'include', 'init', 'ipc', 'kernel', 'lib', 'mm',
'net', 'samples', 'scripts', 'security', 'sound', 'tools', 'usr',
fracs=[100*i/float(result) for i in result[1:]]
#difficult to see all the pie-elements,
for f,l in zip(fracs,dirs):
# make a square figure and axes
ax = axes([0.1, 0.1, 0.8, 0.8])
some googling gives this thread:
but that doesn't solve the problem, just makes it different...
Anyone know of a solution to this problem?
From: Jae-Joon Lee <lee.j.joon@gm...> - 2010-05-26 18:03:50
On Mon, May 24, 2010 at 10:04 AM, Fredrik Pihl <pi.arctan@...> wrote:
> some googling gives this thread:
> but that doesn't solve the problem, just makes it different...
Different, but much easier to solve.
Unfortunately, Matplotlib does not provide any solution for now.
If you're familiar with Python and matplotlib, you may try to code it
by yourself. Otherwise, it may better find other library that does
this for you.
Get latest updates about Open Source Projects, Conferences and News.