clear all; close all;

results_g1 = [1000 -90;
              2000 -88;
              3000 -52;
              4000 -32;
              5000 -50;
              6000 -28;
              7000 -20;
              8000 -18;
              9000 4;
             ];
results_g2 = [1000 -188;
              2000 -24;
              3000 30;
              4000 142;
              5000 218;
              6000 218;
              7000 250;
              8000 462;
              9000 556];
          
subplot(211);
plot(results_g1(:,1),results_g1(:,2),'.--',...
     'MarkerSize',14);
xlabel('Wining and dining 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('Wining and dining dollars spent [$]');
ylabel('Votes for A - Votes for B');
title('Graph 2');
grid on;