if PlotType==1
  caxis([0 2])
  axis square;
  colorbar
end

if PlotType==4
  axis([0 1.5 -1.5 5])

  [rad1d,tref] = readamrdata(1,Frame,'./1drad/');
  if (abs(t - tref) > 1e-8)
    error('times are not compatible');
  end;

  hold on;
  [qref,xref,p] = plotframe1ez(rad1d,mq,'b-');
  set(p,'LineWidth',2);

  h = getlegendinfo;
  str1 = sprintf('2d solution (mx = %d)',mx);
  str2 = sprintf('1d solution (mx = %d)',length(xref));
  legend([h,p],str1,str2);
  hold off;

  % (xcenter,ycenter) and (x0,y0) are in memory.
  [xcm,ycm] = meshgrid(xcenter,ycenter);
  rcm = sqrt((xcm - x0).^2 + (ycm - y0).^2);

  % Use (xref,qref) returned from
  qcm = interp1(xref,qref,rcm,'*cubic');
  ecm = abs(qcm-qmesh);

  figure(2);
  pcolor(xcm,ycm,ecm);
  caxis([0 0.01]);
  axis square;
  colorbar;
  title(sprintf('Maximum error : %12.4e',max(max(ecm))));

  figure(1);
end



clear afterframe;
