title: Matlab click zoom disables for the second time of the loop
body: <p>Consider the following example </p>
  
  <pre><code>ax(1) = subplot(2,1,1)
  plot(1:100,rand(1,100))
  ax(2) = subplot(2,1,2)
  plot(1:100,rand(1,100))
  hzoom(1) = zoom(ax(1));                                               
  hzoom(1).Motion = 'horizontal'; 
  hzoom(2) = zoom(ax(2));                                               
  hzoom(2).Motion = 'horizontal'; 
  zoom on 
  linkaxes(ax, 'x'); 
  waitforbuttonpress;
  while 1
      [x,  ~] = ginput(2); 
      zoom on
      waitforbuttonpress;
      click_break = waitforbuttonpress;
      if(click_break)
          break;
      end
  end
  </code></pre>
  
  <p>In the above plots for the first time of the loop the mouse cursor is magnifying glass and i can zoom into a data by simply selecting it 
  <a href="https://i.stack.imgur.com/Qn68A.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Qn68A.png" alt="enter image description here"></a>
  and here we can see the data is zoomed in </p>
  
  <p><a href="https://i.stack.imgur.com/lQzQC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lQzQC.png" alt="enter image description here"></a></p>
  
  <p>but when i have clicked twice (for the ginput to get datapoints) and the loop runs in the next iteration the cursor doesnt magnify/zoom by selecting the specific data , I know we can also zoom in by scrolling but my scroll has developed some problem the magnification converges to centre data points so the only posibility is data selection through mouse click, am I missing any function in my loop?  </p>