Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > dc303dcad9fdd039290b4e78a58ed938 > files > 639

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

#!/usr/bin/env python

# override the default reporting of coords

from pylab import *

def millions(x):
    return '$%1.1fM' % (x*1e-6)

x =     rand(20)
y =     1e7*rand(20)

ax = subplot(111)
ax.fmt_ydata = millions
plot(x, y, 'o')

show()