function gbmap(opt)

% script to draw Georges Bank bathymetric map

% opt=0 no shaded bathy
% opt=1 with shaded bathy

if nargin==0;opt=1;end;

load map

isobath4000m1b(592,4)=-63.3889;
newcoastline3(2674,3)=50;newcoastline3(2674,3)=50;
newcoastline3(2674,4)=-72;
newcoastline3(2676,:)=newcoastline3(2675,:);
newcoastline3(2675,3)=50;
newcoastline1(848,:)=newcoastline1(847,:);
newcoastline1(847,3)=45;

cgw=[.9999 .9999 .9999];
cg1b=[.99 .99 .99];
cg1a=[.96 .96 .96];
cg1=[.93 .93 .93];
cg2=[.85 .85 .85];
cg3=[.75 .75 .75];
cg4=[.65 .65 .65];
cg5=[.55 .55 .55];
cg6=[.45 .45 .45];
cgb=[.0001 .0001 .0001];

%axes('position',[.16,.35,.70,.6])
%axis([-71 -65 40 43])
hold on

% the following line fills the ocean & land offwhite

% we only shade depth zones if requested
if opt==1;
a=fill(isobath4000m1a(:,4),isobath4000m1a(:,3),cg4);set(a,'edgecolor','none');
a=fill(isobath4000m1b(:,4),isobath4000m1b(:,3),cg5);set(a,'edgecolor','none');
a=fill(isobath4000m2(:,4),isobath4000m2(:,3),cg4);set(a,'edgecolor','none');

a=fill(isobath2000m1(:,4),isobath2000m1(:,3),cg3);set(a,'edgecolor','none');
a=fill(isobath2000m2(:,4),isobath2000m2(:,3),cg3);set(a,'edgecolor','none');
a=fill(isobath2000m3(:,4),isobath2000m3(:,3),cg3);set(a,'edgecolor','none');
a=fill(isobath2000m4(:,4),isobath2000m4(:,3),cg3);set(a,'edgecolor','none');
a=fill(isobath2000m5(:,4),isobath2000m5(:,3),cg3);set(a,'edgecolor','none');

a=fill(isobath200m1(:,4),isobath200m1(:,3),cg2);set(a,'edgecolor','none');
a=fill(isobath200m2(:,4),isobath200m2(:,3),cg3);set(a,'edgecolor','none');
a=fill(isobath200m3(:,4),isobath200m3(:,3),cg3);set(a,'edgecolor','none');
a=fill(isobath200m4(:,4),isobath200m4(:,3),cg3);set(a,'edgecolor','none');
a=fill(isobath200m5(:,4),isobath200m5(:,3),cg3);set(a,'edgecolor','none');
a=fill(isobath200m6(:,4),isobath200m6(:,3),cg3);set(a,'edgecolor','none');
a=fill(isobath200m7(:,4),isobath200m7(:,3),cg3);set(a,'edgecolor','none');
a=fill(isobath200m8(:,4),isobath200m8(:,3),cg3);set(a,'edgecolor','none');
a=fill(isobath200m9(:,4),isobath200m9(:,3),cg3);set(a,'edgecolor','none');
a=fill(isobath200m10(:,4),isobath200m10(:,3),cg3);set(a,'edgecolor','none');
a=fill(isobath200m11(:,4),isobath200m11(:,3),cg3);set(a,'edgecolor','none');
a=fill(isobath200m12(:,4),isobath200m12(:,3),cg3);set(a,'edgecolor','none');
a=fill(isobath200m13(:,4),isobath200m13(:,3),cg3);set(a,'edgecolor','none');
a=fill(isobath200m14(:,4),isobath200m14(:,3),cg3);set(a,'edgecolor','none');
a=fill(isobath200m15(:,4),isobath200m15(:,3),cg3);set(a,'edgecolor','none');
a=fill(isobath200m16(:,4),isobath200m16(:,3),cg3);set(a,'edgecolor','none');

a=fill(isobath100m1(:,4),isobath100m1(:,3),cg1);set(a,'edgecolor','none');
a=fill(isobath100m2(:,4),isobath100m2(:,3),cg1);set(a,'edgecolor','none');
a=fill(isobath100m3(:,4),isobath100m3(:,3),cg1);set(a,'edgecolor','none');
a=fill(isobath100m4(:,4),isobath100m4(:,3),cg1);set(a,'edgecolor','none');
a=fill(isobath100m5(:,4),isobath100m5(:,3),cg1);set(a,'edgecolor','none');
a=fill(isobath100m6(:,4),isobath100m6(:,3),cg1);set(a,'edgecolor','none');
a=fill(isobath100m7(:,4),isobath100m7(:,3),cg1);set(a,'edgecolor','none');
a=fill(isobath100m8(:,4),isobath100m8(:,3),cg1);set(a,'edgecolor','none');
a=fill(isobath100m9(:,4),isobath100m9(:,3),cg1);set(a,'edgecolor','none');
a=fill(isobath100m10(:,4),isobath100m10(:,3),cg1);set(a,'edgecolor','none');
a=fill(isobath100m11(:,4),isobath100m11(:,3),cg1);set(a,'edgecolor','none');
a=fill(isobath100m12(:,4),isobath100m12(:,3),cg1);set(a,'edgecolor','none');
a=fill(isobath100m13(:,4),isobath100m13(:,3),cg1);set(a,'edgecolor','none');
a=fill(isobath100m14(:,4),isobath100m14(:,3),cg1);set(a,'edgecolor','none');

% note: if you want 60m to show up make edgecolor 'w', say
a=fill(isobath60m1(:,4),isobath60m1(:,3),cg1a);set(a,'edgecolor','none');
a=fill(isobath60m2(:,4),isobath60m2(:,3),cg1a);set(a,'edgecolor','none');
a=fill(isobath60m3(:,4),isobath60m3(:,3),cg1a);set(a,'edgecolor','none');
a=fill(isobath60m4(:,4),isobath60m4(:,3),cg1a);set(a,'edgecolor','none');
a=fill(isobath60m5(:,4),isobath60m5(:,3),cg1a);set(a,'edgecolor','none');

a=fill(isobath40m1(:,4),isobath40m1(:,3),cgw);set(a,'edgecolor','none');
a=fill(isobath40m2(:,4),isobath40m2(:,3),cgw);set(a,'edgecolor','none');
a=fill(isobath40m3(:,4),isobath40m3(:,3),cgw);set(a,'edgecolor','none');
a=fill(isobath40m4(:,4),isobath40m4(:,3),cgw);set(a,'edgecolor','none');
a=fill(isobath40m5(:,4),isobath40m5(:,3),cgw);set(a,'edgecolor','none');
a=fill(isobath40m6(:,4),isobath40m6(:,3),cgw);set(a,'edgecolor','none');
a=fill(isobath40m7(:,4),isobath40m7(:,3),cgw);set(a,'edgecolor','none');
a=fill(isobath40m8(:,4),isobath40m8(:,3),cgw);set(a,'edgecolor','none');
a=fill(isobath40m9(:,4),isobath40m9(:,3),cgw);set(a,'edgecolor','none');
a=fill(isobath40m10(:,4),isobath40m10(:,3),cgw);set(a,'edgecolor','none');

%a=fill(isobath20m1(:,4),isobath20m1(:,3),cg1b);set(a,'edgecolor','none');
%a=fill(isobath20m2(:,4),isobath20m2(:,3),cg1b);set(a,'edgecolor','none');
%a=fill(isobath20m3(:,4),isobath20m3(:,3),cg1b);set(a,'edgecolor','none');
%a=fill(isobath20m4(:,4),isobath20m4(:,3),cg1b);set(a,'edgecolor','none');
%a=fill(isobath20m5(:,4),isobath20m5(:,3),cg1b);set(a,'edgecolor','none');
%a=fill(isobath20m6(:,4),isobath20m6(:,3),cg1b);set(a,'edgecolor','none');
%a=fill(isobath20m7(:,4),isobath20m7(:,3),cg1b);set(a,'edgecolor','none');

elseif opt==0;
% the following line fills the ocean & land offwhite
a=fill(isobath4000m1a(:,4),isobath4000m1a(:,3),cgw);set(a,'edgecolor','none');
end;

a=fill(newcoastline1(:,4),newcoastline1(:,3),cgb);set(a,'edgecolor','none');
a=fill(newcoastline2(:,4),newcoastline2(:,3),cgb);set(a,'edgecolor','none');
a=fill(newcoastline3(:,4),newcoastline3(:,3),cgb);set(a,'edgecolor','none');
a=fill(newcoastline4(:,4),newcoastline4(:,3),cgb);set(a,'edgecolor','none');
a=fill(newcoastline5(:,4),newcoastline5(:,3),cgb);set(a,'edgecolor','none');
a=fill(newcoastline6(:,4),newcoastline6(:,3),cgb);set(a,'edgecolor','none');
a=fill(newcoastline7(:,4),newcoastline7(:,3),cgb);set(a,'edgecolor','none');
a=fill(newcoastline8(:,4),newcoastline8(:,3),cgb);set(a,'edgecolor','none');
a=fill(newcoastline9(:,4),newcoastline9(:,3),cgb);set(a,'edgecolor','none');
a=fill(newcoastline10(:,4),newcoastline10(:,3),cgb);set(a,'edgecolor','none');
a=fill(newcoastline11(:,4),newcoastline11(:,3),cgb);set(a,'edgecolor','none');
a=fill(newcoastline12(:,4),newcoastline12(:,3),cgb);set(a,'edgecolor','none');
a=fill(newcoastline13(:,4),newcoastline13(:,3),cgb);set(a,'edgecolor','none');
a=fill(newcoastline14(:,4),newcoastline14(:,3),cgb);set(a,'edgecolor','none');
a=fill(newcoastline15(:,4),newcoastline15(:,3),cgb);set(a,'edgecolor','none');
a=fill(newcoastline16(:,4),newcoastline16(:,3),cgb);set(a,'edgecolor','none');
a=fill(newcoastline17(:,4),newcoastline17(:,3),cgb);set(a,'edgecolor','none');
a=fill(newcoastline18(:,4),newcoastline18(:,3),cgb);set(a,'edgecolor','none');
a=fill(newcoastline19(:,4),newcoastline19(:,3),cgb);set(a,'edgecolor','none');
a=fill(newcoastline20(:,4),newcoastline20(:,3),cgb);set(a,'edgecolor','none');
a=fill(newcoastline21(:,4),newcoastline21(:,3),cgb);set(a,'edgecolor','none');
a=fill(newcoastline22(:,4),newcoastline22(:,3),cgb);set(a,'edgecolor','none');
a=fill(newcoastline23(:,4),newcoastline23(:,3),cgb);set(a,'edgecolor','none');


% Improve axes labels
set(gca,'TickDir','out')
yt=[40 41 42 43 ];
set(gca,'Ytick',yt)
xt=[-71 -70 -69 -68 -67 -66 -65];
set(gca,'Xtick',xt)
set(gca,'fontname','times')
set(gca,'fontsize',14)
%set(gca,'fontw','bold')

% Add labels
global al
if al==1;
t1=text(-65.3,40.45,'4000');
set(t1,'Rotation',35)
set(t1,'fontname','times')
set(t1,'fontsize',10)
set(t1,'fontw','bold')
set(t1,'col',cgb)

t1=text(-65.3,41.8,'2000');
set(t1,'Rotation',45)
set(t1,'fontname','times')
set(t1,'fontsize',10)
set(t1,'fontw','bold')
set(t1,'col',cgb)

t1=text(-65.25,42.3,'200');
set(t1,'Rotation',40)
set(t1,'fontname','times')
set(t1,'fontsize',10)
set(t1,'fontw','bold')
set(t1,'col',cgb)


t2=text(-65.3,42.55,'100');
set(t2,'Rotation',45)
set(t2,'fontname','times')
set(t2,'fontsize',10)
set(t2,'fontw','bold')
set(t2,'col',cgb)

t1=text(-66.15,42.7,'60');
set(t1,'Rotation',40)
set(t1,'fontname','times')
set(t1,'fontsize',10)
set(t1,'fontw','bold')
set(t1,'col',cgb)

t1=text(-70.4,41.95,'40');
set(t1,'Rotation',20)
set(t1,'fontname','times')
set(t1,'fontsize',10)
set(t1,'fontw','bold')
set(t1,'col',cgb)
end;

%add thick border line
%box=[-71 43; -71 40;-65 40;-65 43;-71 43];
%h=plot(box(:,1),box(:,2));set(h,'linewidth',3)
%clear box h
