title: Matlab: ginput in GUI in a plot
body: <p>I am trying to get the coordinates from a plot that is inside a GUI, I wanted to use ginput function but I don't know how to use it in a plot inside a GUI. I have seen a framework called ginputax but I have not been able to make it work. My code is like this:</p>
  
  <pre><code>f=openfig('gui_final_work');
  ctrl=guihandles(f);
  [x y] = ginput(1);
  </code></pre>
  
  <p>I have also tried:</p>
  
  <pre><code>f=openfig('gui_final_work');
  ctrl=guihandles(f);
  [x y] = ginputax(1,ctrl.axes1);
  </code></pre>
  
  <p>but both cases generate a new figure separated from the GUI. Any hint will be appreciated...Thank you in advance.</p>