% Fix color map
c = linspace(0.5,0.8,20)';
colormap([c c c]);
caxis([0 1])

% Draw contourlines
cv = linspace(0.25,1.5,40);
drawcontourlines(cv);

% hide or show patch bordes/grid lines depending on what kind
% of plot we want.
% If you don't want to show the amr grid lines, use :
% hidepatchborders;
% showmesh(25);

% or for amr grid lines :
showgridlines(1);

% Fix zoom state to resize plot :
% For plotting purposes, it is better to adjust the camera view angle
% rather than the size in the latex file.  By adjusting the view angle
% the outer figure size is the same, and so it can be centered more
% easily in Latex.
% smaller camera view angle --> the ball appears larger
% Larger camera view angle --> the ball appears smaller.

set(gca,'cameraviewanglemode','manual');
set(gca,'cameraviewangle',7);
if (Manifold == 0)
  set(gca,'xlim',[-3 1],'ylim',[-3 1]);
  set(gca,'box','on');
  set(gca,'xtick',-3:1);
  set(gca,'ytick',-3:1);
  set(gca,'fontsize',18);
else
  view([50 30])
  axis off;
end;

daspect([1 1 1])

% Get rid of extraneous text that can mess up the sizing in Latex
delete(get(gca,'title'));
delete(get(gca,'xlabel'));
delete(get(gca,'ylabel'));

yn = input('Print file? (y/n) : ','s');
if (strcmp(yn,'y'))
  set(gcf,'renderer','opengl');
  str = ['print -depsc2 ../figs_eps/adv_3',fig_ch,'.eps'];
  fprintf('Using command : %s\n',str);
  eval(str);
end;


clear afterframe;
