title: Loop over subplots
body: <p>Somehow, the title, xlabel, ylabel, ylim and xlim does not stay fixed in the script below, how do I fix this?</p>
  
  <pre><code>    x = 0:0.01:1;
  
  figure
  p1 = subplot(2,1,1);
  xlabel(p1, '$x$','Interpreter','LaTex', 'Fontsize', 16);
  ylabel(p1, '$\sin(x+t)$','Interpreter','LaTex', 'Fontsize', 16);
  title(p1, 'Sine','Interpreter','LaTex', 'Fontsize', 20);
  ylim(p1, [-1 2]) 
  xlim(p1, [0 1]) 
  
  p2 = subplot(2,1,2);
  xlabel(p2, '$x$','Interpreter','LaTex', 'Fontsize', 16);
  ylabel(p2, '$\cos(x+t)$','Interpreter','LaTex', 'Fontsize', 16);
  title(p2, 'Cosine','Interpreter','LaTex', 'Fontsize', 20);
  ylim(p2, [-2 1])
  xlim(p2, [0 1]) 
  
  for t = 0:0.1:2
      plot(p1, x, sin(x+t))      
      plot(p2, x, cos(x+t))
      pause(0.1)
  end
  </code></pre>