# Histogram of team ERA distribution: Rangers vs. Yankees in 2000s
h2000s = computeHistogram(channel=conn, tableName='pitching_enh', columnName='era',
binsize=0.2, startvalue=0, endvalue=10, by='teamid',
where="yearID between 2000 and 2012 and teamid in ('NYA','TEX')")
createHistogram(h2000s, fill='teamid', facet='teamid',
title='TEX vs. NYY 2000-2012', xlab='ERA', ylab='count',
legendPosition='none')Run the code above in your browser using DataLab