title: Superimpose plots Matlab
body: <p>I have two signals, one for each axis and taken singularly and plotted in a standard way separately they would look like this:</p>
  
  <p><img src="https://i.stack.imgur.com/zOs7Q.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/RAJPT.png" alt="enter image description here"></p>
  
  <p>However they represent different measurements and I need to superimpose them by representing one on the standard X-Y axis (bottom-left) and one on a different set of coordinate axis (X = left, Y = top).</p>
  
  <p>I thought of the following code:</p>
  
  <pre><code>    figure(1); 
      line(1:128,imagesXMatrix(i,:));
      ax1 = gca;
      set(ax1,'XColor','r','YColor','r')
      ax2 = axes('Position',get(ax1,'Position'), ...
            'XAxisLocation','left','YAxisLocation','top', ...
            'Color', 'none','XColor','k','YColor','k');
      line(1:128,imagesYMatrix(i,:),'Parent',ax2);
  </code></pre>
  
  <p>but am getting the following error:</p>
  
  <blockquote>
    <p>Error using axes </p>
    
    <p>Bad property value found. </p>
    
    <p>Object Name: axes Property</p>
    
    <p>Name: 'XAxisLocation'.</p>
  </blockquote>
  
  <p>which I guess means that value <code>left</code> is not ok for the <code>XAxisLocation</code> variable.</p>
  
  <p>What I would really want is simply the superimposition of the two following plots, any idea on how to make it happen?</p>
  
  <p><img src="https://i.stack.imgur.com/M7CUV.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/TD4XH.png" alt="enter image description here"></p>
  
  <p>Thanks a lot!</p>