主要内容

Geolimits

设置或查询地理限制

Description

example

Geolimits(latlim,孤独)调整当前地理轴或图表的地理极限,包括拉蒂姆(1)to拉蒂姆(2)和纵向孤独(1)to孤独(2). If there is no current geographic axes or chart,Geolimitsconstructs a default地理object and sets its limits.

example

[latitudeLimits,纵向] = geolimitsreturns the latitude limits and longitude limits of the current geographic axes or chart.

Geolimits('auto')让地理轴或图表根据其数据位置选择其地理极限。

Geolimits('manual')requests that the axes or chart preserve its current limits as closely as possible when the map is resized or when its data locations change.

[latitudeLimits,纵向] = geolimits(___)adjusts the geographic limits and returns the actual limits of the map.

Note

Typically, the actual limits chosen byGeolimitsare greater in extent than the requested limits becauseGeolimits管理限制,以保持正确的南北/东西向方面。

___= geolimits(gx,___)operates on the geographic axes or chart specified bygx.

Examples

collapse all

Read tsunami data from a spreadsheet into a table.

tsunamis = readtable('tsunamis.xlsx');

Get the latitude and longitude data from the table. This data specifies the locations of the tsunamis. In addition, get data about the size of each tsunami from the table.

lat = tsunamis.Latitude; lon = tsunamis.Longitude; sizedata = tsunamis.MaxHeight;

Create a geographic bubble chart with the tsunami data. Set the title of the size legend by specifyingSizeLegendTitle.

GeoBubble(LAT,LON,Sipedata,'SizeLegendTitle','Maximum Height')

Get the current geographic limits of the chart. By default,geobubblesets the map limits large enough to encompass all the locations in the data.

[LATLIM,LONLIM] = Geolimits
latlim =1×2-79.8575 85.0511
孤独=1×2-295.8338 37.8078

Modify the geographic limits to get a closer look at tsunami activity in Alaska. The example also specifies a title for the geographic bubble chart.

Geolimits([50 65],[-175 -130]) title('Tsunamis in Alaska')

Get the actual geographic limits used by the chart. Due to zoom level quantization and aspect ratio preservation, the actual limits may differ from the requested limits.

[LATLIM,LONLIM] = Geolimits
latlim =1×245.0809 67.9103
孤独=1×2-175.0000 -130.0000

Input Arguments

collapse all

地理轴的限制或纬度图,指定为两元素向量。

Example:[50 65]

Data Types:single|double

Limits of the geographic axes or chart in longitude, specified as a two-element vector.

Example:[-175 -130]

Data Types:single|double

Geographic axes or chart, specified as a地理object orGeographicBubbleChart目的。[1]

Output Arguments

collapse all

Actual latitude limits of map, returned as two-element vector.

Actual longitude limits of map, returned as two-element vector.

Introduced in R2017b

[1]边界和区域标签的一致性是数据供应商提供的功能的介绍,并不意味着Mathworks认可®.