function ast2DGeoidPlot(RRR,geoidResults,coast,gridDegInc)
% ast2DGeoidPlot: this is a helper function for astvrViewGeoidHeight to
% create a meshm plot.

%   Copyright 2011-2020 The MathWorks, Inc.

% Define map axis
axesm('MapProjection','eqdcylin','MapLatLimit',[-90 90],...
    'MapLonLimit',[-180 180],'Grid','on','Frame','off',...
    'MeridianLabel','on','LabelFormat','none',...
    'MLabelParallel','South','ParallelLabel','on',...
    'PLabelLocation',30);

% Plot geoid data
meshm(geoidResults,RRR);
colormap('jet');

% Plot coast outline
geoshow(coast.coastlat,coast.coastlon,'Color', 'black')
axis off
tightmap

title({'EGM96 Geoid Heights';['Grid Increment: ' ,num2str(gridDegInc), ' Degrees; Height Units: Meters']})
contourcbar('location','EastOutside')

% Position plot
set(gca,'Position',[.1 .52 .8 .4]);