goals # Plots a histogram of goals allowed by Michigan in the 2002-2003 season # Data from mgoblue.com # 12-16-03 data goals.dat # set the data file read {goals 1} # Read in the data -- only 1 column, the # of goals allowed, is necessary vecminmax goals min max # We want the maximum # of goals allowed, to make life easy set bins = 0, $max, 1 # Set the location of the bins -- ranging from 0 to the max goals # allowed, with increments of 1 goal set agoals = histogram(goals:bins) # Sort the vector goals into the correct bins lim bins 0 15 box histogram bins agoals # Draw the histogram xlabel Number of Goals Allowed ylabel Number of Games toplabel Distribution of Goals Allowed in the 2002-2003 Season