pyp_db.loadPedigreeTable(ay)
coi_by_year = pyp_reports.meanMetricBy(ay,metric='fa',byvar='by')
cby = coi_by_year
del(cby[1900])
pyp_graphics.plot_line_xy(coi_by_year, gfilename='ay_coi_by_year',
gtitle='Inbreeding coefficients for Ayrshire cows', gxlabel='Birth year',
gylabel='Coefficient of inbreeding')
If you need more complicated plots than are produced by plot_line_xy() you can write a new plotting function (Chapter 11) that uses the tools in matplotlib (http://matplotlib.sourceforge.net/). For complete details on the options taken by plot_line_xy please refer to the API documentation (