title: Plotting Error in Matlab
body: <p>Having an issue with printing my matlab plots into a PDF. After researching for a solution for several hours I have been unable to find a solution. I keep getting the same error message. I appreciate your help. </p>
  
  <pre><code>x = [2 4 7 2 4 5 2 5 1 4];
  fig=plot(x);
  print(fig,'-dpdf')
  
  
  
  Error using
  checkArgsForHandleToPrint&gt;LocalCheckHandles
  (line 88)
  MATLAB Graphics handle must be a figure.
  
  Error in checkArgsForHandleToPrint (line 30)
  
  
  
  Error in print&gt;LocalCreatePrintJob (line 336)
      handles = checkArgsForHandleToPrint(0,
      varargin{:});
  
  Error in print (line 153)
      [pj, inputargs] =
      LocalCreatePrintJob(varargin{:});
  </code></pre>