[Tutor] how to graph percentile -- matplotlib, Inkscape, or what?

David ldl08 at gmx.net
Sat Feb 6 08:55:26 CET 2010


Dear List,

given a list of scores (n = 20, say) a group students received in an 
exam, I can use

sarray = [list of scores]
score = student's score
scipy.stats.percentileofscore(sarray, score, kind='mean')

to calculate the percentile for a given student. What I would like to do 
is to create a graph in which on the horizontal axis the student's 
precentile (i.e. performance vis-a-vis her classmates) is indicated by 
means of a needle stuck into the axis:

			   O (63%)	
|__________________________|______________|
|				          |
0					 100

I suspect that I cannot plot this with matplotlib, and my next best 
guess would be Inkscape, with which I have no scripting experience 
whatsoever.

Is Inkscape the way forward for this little project? What are my 
alternatives?

Thanks for your ideas!

David


More information about the Tutor mailing list