% Fix color map
c = linspace(0.5,0.75,101)';
colormap([c c c]);
caxis([1 1.7])

% Draw contourlines
cv = linspace(0.5,1.8,29);
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(10,1);

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

% 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);


ch = input('Plot Figure 4a or 4b? ([a],[b]) : ', 's');
if (strcmp(ch,'a'))
  % For Figure 4a :
  view([-40 20])
else
  % For Figure 4b :
  view([30 40]);
  hidegridlines;
end;

daspect([1 1 1])
axis off;

% 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/swe_4',ch,'.eps'];
  fprintf('Using command : %s\n',str);
  % eval(str);
end;


clear afterframe;
