Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates > by-pkgid > dc303dcad9fdd039290b4e78a58ed938 > files > 621

python-matplotlib-0.99.1.2-4.fc13.i686.rpm

#!/usr/bin/env python
# make a horizontal bar chart

from pylab import *
val = 3+10*rand(5)    # the bar lengths
pos = arange(5)+.5    # the bar centers on the y axis

figure(1)
barh(pos,val, align='center')
yticks(pos, ('Tom', 'Dick', 'Harry', 'Slim', 'Jim'))
xlabel('Performance')
title('How fast do you want to go today?')
grid(True)

figure(2)
barh(pos,val, xerr=rand(5), ecolor='r', align='center')
yticks(pos, ('Tom', 'Dick', 'Harry', 'Slim', 'Jim'))
xlabel('Performance')

show()