%% Create and Configure Axes Manually
% Occasionally, you might need to create the axes manually before calling a plotting function. When you create the axes, specify the parent argument as the tiled chart layout. Then position the axes by setting the Layout property on the axes.
% Create a tiled chart layout t and specify the 'flow' tile arrangement. Display a plot in each of the first three tiles.

t = tiledlayout('flow');
nexttile
plot(rand(1,10));
nexttile
plot(rand(1,10));
nexttile
plot(rand(1,10));

%
% Create a geographic axes object gax by calling the geoaxes function and specify t as the parent argument. By default, the axes goes into the first tile, so move it to the fourth tile by setting gax.Layout.Tile to 4. Span the axes across a 2-by-3 region of tiles by setting gax.Layout.TileSpan to [2 3].

gax = geoaxes(t);
gax.Layout.Tile = 4;
gax.Layout.TileSpan = [2 3];

%
%  Call the geoplot function. Then configure the map center and zoom level for the axes.

geoplot(gax,[47.62 61.20],[-122.33 -149.90],'g-*')
gax.MapCenter = [47.62 -122.33];
gax.ZoomLevel = 2;

%
% Copyright 2019 The MathWorks, Inc.