States = textread('statenames.txt', '%s');
fid = fopen('line-mccain-pop.txt');
Data = fscanf(fid, '%g%g%g', [3,50]);
Data = 100* Data;
hold on
% plot(Data(1,:), Data(2,:), 'x')
text(Data(1,:)+.1, Data(2,:), States, 'fontname', 'lucida', 'horizontalalignment', 'center')
axis([0, 15, -20, 20])
fit = polyfit(Data(1,:), Data(2,:), 1)
linex = [2, 13];
line(linex, fit(1)*linex+fit(2), 'color', 'red')

ylabel('% McCain outperforms pre-election polls','FontSize',16)
xlabel('"long lines" in election day news articles (%)','FontSize',16)
title('McCain advantage from long lines?','FontSize',16)