The code below generates a plot of the annual risk of death by age and gender using the provided data.
import pylab
# Annual risk of death by age and gender (UK national mortality statistics)
# Risk is 1 in N in age bins given by ages[i-1] - ages[i]
ages = pylab.array([1, 4, 14, 24, 34, 44, 54, 64, 74, 84, 94])
f_risk = pylab.array([227, 5376, 10417, 4132, 2488, 1106, 421, 178, 65, 21, 7])
m_risk = pylab.array([177, 4386, 8333, 1908, 1215, 663, 279, 112, 42, 15, 6])
pylab.plot(ages, -pylab.log10(f_risk), color='m', marker='^',
markeredgecolor='m', markersize=9, label='Female')
pylab.plot(ages, -pylab.log10(m_risk), color='b', marker='s',
markeredgecolor='b', markersize=9, label='Male')
pylab.xlabel('Age /years')
pylab.ylabel('Risk of death (1 in $10^{-N}$)')
pylab.legend(loc='upper left')
pylab.title('Risk of death by age and gender')
pylab.show()