function continent = mapzoom(continent_num)
%Zooms a Matlab plot in lat, lon to the extent of one of the continents
% returns the name of the region it zoomed to, as a string, 
%  mapzoom(1) 
%      zooms to North America
%      returns "North America"
%
% 0 Earth
% 1 North America
% 2 South America
% 3 Europe
% 4 North Africa
% 5 Australia 
% 6 Asia
% 7 The Amazon
% 8 Earth, excluding Antarctica
% 9 Africa
%
% by default, this works on the active figure, gcf
%
% To easily get more extents, use https://bboxfinder.com
% Coordinates are [left, bottom, right, top]

continents = [
    "North America", 
    "South America",
    "Europe",
    "North Africa",
    "Australia",
    "Asia",
    "The Amazon",
    "Earth north of 60°S"
    "Africa"
];

%continent = continents(continent_num);

if continent_num == 0
    X = [-180, -90, 180, 90];
    continent = "Whole Earth"
else
    continent = continents(continent_num);
    extents = {};

    % 1 North America
    extents{1} =[-130, 25, -60, 55];

    % 2 South America
    extents{2} = [-120, -59, -20, 16];

    % 3 Europe
    extents{3} = [-15, 30, 30, 60];

    % 4 North Africa
    extents{4} = [-24, -20, 59, 38];

    % 5 Australia
    extents{5} = [105, -42 , 160, -10];

    % 6 Asia
    extents{6} = [60, 0, 140, 60];

    % 7 The Amazon
    extents{7} = [-85, -20, -33, 10];

    % 8 GLOBE without Antarctica
    extents{8} = [-180, -60, 180, 90];

    % 9 Africa
    extents{9} = [-25,-40 ,56, 40];

    X = extents{continent_num};
end

left   = X(1);
bottom = X(2);
right  = X(3);
top    = X(4); 

xlim([left, right]);
ylim([bottom, top]);



end