title: Why does assigning an object to a subplot claim object is deleted?
body: <p>I want to make 4 separate sub-figures each in a different position. my goal was to setup the figures first and following add objects to each figure with the goal to animate the objects later. Everything seems to work fine until I try to parent the objects to the sub-figure. the error doesn't occur when I add the objects right after building the sub-figure using the following code.</p>
  
  <pre><code>H1 = subplot('Position',[0.2,0.2,0.2,0.2]);
  rectangle('Parent',H1,'Position',[10,20,20,20])
  </code></pre>
  
  <p>The error seems to rise when I try to callback to a figure built afterwards as seen in the code I am currently working on below.</p>
  
  <pre><code>screencolor = [0,0,0];
  StimWindow = figure('MenuBar','none', ...                    % Build Window for stimulus
      'Color',screencolor);
  
  figuresize = get(0,'ScreenSize'); 
  
  set(StimWindow,'Position',figuresize);
  set(0,'defaultaxesposition',[0 0 1 1])
  Stimsubfigures{1} = subplot('Position',[0,0,1,1]);       % First subplot figure which spans the entire screen 
  set(Stimsubfigures{1},'xLim',[0,100])
  set(Stimsubfigures{1},'YLim',[0,100])
  set(Stimsubfigures{1},'Visible','off')
  
  % create subplots for stim system 3 plate setup
  for aa = 2:4
      Stimsubfigures{aa} = subplot(...
                                  'Position',[.01+aa*.21,.2,.2,.2], ...
                                  'color','none');
      set(Stimsubfigures{aa},'xLim',[0,100])
      set(Stimsubfigures{aa},'YLim',[0,100])
      set(Stimsubfigures{aa},'Visible','off')
  end
  
  OrtDish = rectangle(...
      'Parent',Stimsubfigures{1},...
      'Position', [0,0,100,100],...                            
      'facecolor',screencolor,...
      'edgecolor',[.5,0,0],...
      'curvature',[1,1],...
      'LineWidth',3);
  </code></pre>
  
  <p>The error displayed states an object cannot be attached to a deleted handle. I will provide the exact error when I reach a computer.</p>
  
  <p>This is weird as the handle wasn't deleted, it was stored in a cell matrix.</p>