title: Handles not importing plot to GUI - MATLAB
body: <p>I have a .fig file with its own GUI controlling .m script. And I have a user-defined script for calculations. There's a plot in my user-defined script which I want in my G.U.I. The .fig file consists of a set of 5 axes plots like this:</p>
  
  <p><img src="https://i.stack.imgur.com/EfPuP.png" alt="enter image description here"></p>
  
  <p>my user-defined script with the function for plotting is like this:</p>
  
  <pre><code>function MyScript = MyFile(handles)
  </code></pre>
  
  <p>Ignoring the data used to obtain the plot itself, my plotting function is written in the same user-defined function as</p>
  
  <pre><code>plot(handles.x,y)
  </code></pre>
  
  <p>In the GUI script I call MyScript:</p>
  
  <pre><code>% --- Executes just before SoftwareMonitoringToolGUI is made visible.
  function SoftwareMonitoringToolGUI_OpeningFcn(hObject, eventdata, handles, varargin)
  % This function has no output args, see OutputFcn.
  % hObject    handle to figure
  % eventdata  reserved - to be defined in a future version of MATLAB
  % handles    structure with handles and user data (see GUIDATA)
  % varargin   command line arguments to SoftwareMonitoringToolGUI (see VARARGIN)
  
  % Choose default command line output for SoftwareMonitoringToolGUI
  handles.output = hObject;
  
  MyScript(handles);
  % Update handles structure
  guidata(hObject, handles);
  </code></pre>
  
  <p>But it doesn't work. Can anyone tell me what i'm doing wrong? </p>
  
  <p>NOTE: I am just trying to get 1 of the plots working at the moment (in this query). I COULD use subplot but I want to visually display all 5 plots at once and eventually add more options like sliders etc.</p>