В этом примере показано, как выводить на график четыре области рамки и сетки Робинсона с использованием лимитов карты. Изначально каждый из сюжетов показывает весь мир, FLatLimit равно [-90 90], и FLonLimit является [-180 180] для каждого случая. Рамочный четырёхугольник может также охватывать меньшие области, в этом случае форма представляет собой участок полноокружного контура или просто четырёхугольник с прямыми или криволинейными сторонами.
Постройте график четырёх четырёхугольников в проекции Робинсона, симметричной относительно простого меридиана.
figure('color','white') subplot(2,2,1); axesm('MapProjection','robinson',... 'Frame','on','Grid','on') title('Lat [-90 90], Map lons [-180 180]','FontSize',10) subplot(2,2,2); axesm('MapProjection','robinson',... 'MapLatLimit',[30 70],'MapLonLimit',[-90 90],... 'Frame','on','Grid','on') title('Lat [30 70], Lon [-90 90]','FontSize',10) subplot(2,2,3); axesm('MapProjection','robinson',... 'MapLatLimit',[-90 0],'MapLonLimit',[-180 -30],.... 'Frame','on','Grid','on') title('Lat [-90 0], Lon [-180 -30]','FontSize',10) subplot(2,2,4); axesm('MapProjection','robinson',... 'MapLatLimit',[-70 -30],'MapLonLimit',[60 150],... 'Frame','on','Grid','on') title('Lat [-70 -30], Lon [60 150]','FontSize',10)
![Figure contains 4 axes. Axes 1 with title Lat [-90 90], Map lons [-180 180] contains 3 objects of type patch, line. Axes 2 with title Lat [30 70], Lon [-90 90] contains 3 objects of type patch, line. Axes 3 with title Lat [-90 0], Lon [-180 -30] contains 3 objects of type patch, line. Axes 4 with title Lat [-70 -30], Lon [60 150] contains 3 objects of type patch, line.](../examples/map/win64/PlotRegionsOfRobinsonFrameAndGridUsingMapLimitsExample_01.png)
Постройте график для тех же областей, но с измененными границами рамки после проецирования. Проекции не центрированы на первичном меридиане. Вместо этого проекции симметричны относительно границ карты.
figure('color','white') h11 = subplot(2,2,1); axesm('MapProjection','robinson',... 'Frame','on','Grid','on') title('Lat [-90 90], Lon [-180 180]') h12 = subplot(2,2,2); axesm('MapProjection','robinson',... 'Frame','on','Grid','on') setm(h12,'FLatLimit',[30 70],'FLonLimit',[-90 90]) title('Lat [30 70], Lon [-90 90]') h21 = subplot(2,2,3); axesm('MapProjection','robinson',... 'Frame','on','Grid','on') setm(h21,'FLatLimit',[-90 0],'FLonLimit',[-180 -30]) title('Lat [-90 0], Lon [-180 -30]') h22 = subplot(2,2,4); axesm('MapProjection','robinson',... 'Frame','on','Grid','on') setm(h22,'FLatLimit',[-70 -30],'FLonLimit',[60 150]) title('Lat [-70 -30], Lon [60 150]')
![Figure contains 4 axes. Axes 1 with title Lat [-90 90], Lon [-180 180] contains 3 objects of type patch, line. Axes 2 with title Lat [30 70], Lon [-90 90] contains 3 objects of type patch, line. Axes 3 with title Lat [-90 0], Lon [-180 -30] contains 3 objects of type patch, line. Axes 4 with title Lat [-70 -30], Lon [60 150] contains 3 objects of type patch, line.](../examples/map/win64/PlotRegionsOfRobinsonFrameAndGridUsingMapLimitsExample_02.png)
Чтобы создать симметричный кадр в нижнем правом вложенном графике, сбросьте границы карты вместо пределов кадра, но не забудьте сбросить начало координат.
setm(h22,'MapLonLimit',[60 150],'Origin',[])
![Figure contains 4 axes. Axes 1 with title Lat [-90 90], Lon [-180 180] contains 3 objects of type patch, line. Axes 2 with title Lat [30 70], Lon [-90 90] contains 3 objects of type patch, line. Axes 3 with title Lat [-90 0], Lon [-180 -30] contains 3 objects of type patch, line. Axes 4 with title Lat [-70 -30], Lon [60 150] contains 3 objects of type patch, line.](../examples/map/win64/PlotRegionsOfRobinsonFrameAndGridUsingMapLimitsExample_03.png)
Изменение свойств фрейма, который фактически является фрагментом с цветом грани, равным 'none'. Задайте цвет грани равным 'cyan'.
setm(gca,'FFaceColor','cyan')
![Figure contains 4 axes. Axes 1 with title Lat [-90 90], Lon [-180 180] contains 3 objects of type patch, line. Axes 2 with title Lat [30 70], Lon [-90 90] contains 3 objects of type patch, line. Axes 3 with title Lat [-90 0], Lon [-180 -30] contains 3 objects of type patch, line. Axes 4 with title Lat [-70 -30], Lon [60 150] contains 3 objects of type patch, line.](../examples/map/win64/PlotRegionsOfRobinsonFrameAndGridUsingMapLimitsExample_04.png)