global map_2d;

if (PlotType ~= 1)
  return
end;

dir = './sphere_axis';
[amr2d,t2d] = readamrdata(2,Frame,dir);
if (isempty(amr2d))
  fprintf('No data files in %s\n',dir);
elseif (abs(t2d - t) > 1e-12)
  fprintf('Times are not compatible\n')
else
  if (UserVariable == 1)
    uf = UserVariableFile;
  else
    uf = '';
  end;

  switch mq
  case {1,2,3}
    mq2d = mq;
  case 4
    error('Cannot plot mq == 4 in 2d');
  case 5
    mq2d = 4;
  end;

  fprintf('Plotting 2d slice...\n');

  cv = ContourValues;

  map_2d = true;
  q2d  = plotframe2ez(amr2d,mq2d,PlotType,'z',0,cv,uf,'mapc2p_2d');
  map_2d = false;

  hidegridlines;

  hold off;
end;

axis([-1 1 -1 1 -1 0]);
view(vtop);
daspect([1 1 1]);
showpatchborders;
setslicecolor('none');
axis off;
title(sprintf('t = %6.2f',t),'fontsize',18);
set(gca,'fontsize',14);
axis off;

clear afterframe;
