clear all; close all;

results_g1 = [1000 -74;
              2000 -46;
              3000 -44;
              4000 -10;
              5000 4;
              6000 36;
              7000 74;
              8000 96;
              9000 122;
             ];
results_g2 = [1000 -236;
              2000 -202;
              3000 -172;
              4000 -94;
              5000 -128;
              6000 -56;
              7000 16;
              8000 14;
              9000 90];
          
subplot(211);
plot(results_g1(:,1),results_g1(:,2),'.--',...
     'MarkerSize',14);
xlabel('Advertising dollars spent [$]');
ylabel('Votes for A - Votes for B');
title('Graph 1');
grid on;

subplot(212);
plot(results_g2(:,1),results_g2(:,2),'.--',...
     'MarkerSize',14);
xlabel('Advertising dollars spent [$]');
ylabel('Votes for A - Votes for B');
title('Graph 2');
grid on;