Main Content

geobasemap

Set or query basemap

Description

geobasemap basemap sets the Basemap property for the current geographic axes or geographic bubble chart to the value specified by basemap. If the current axes is not a geographic axes or geographic bubble chart, or if there is no current axes, then the function creates a new geographic axes with the specified basemap. When you use this syntax, you do not need to enclose the basemap argument in quotes, for example geobasemap topographic.

example

geobasemap(basemap) sets the basemap for the current geographic axes or chart. When you use this syntax, enclose the basemap argument in single or double quotes, for example geobasemap('topographic').

geobasemap(gx,basemap) sets the basemap for the geographic axes or chart specified by gx.

bmap = geobasemap returns the value of the Basemap property for the current geographic axes or chart.

bmap = geobasemap(gx) returns the basemap value for the geographic axes or chart specified by gx.

Examples

collapse all

Create a geographic bubble chart. By default, the geographic bubble chart uses the 'streets-light' basemap.

tsunamis = readtable('tsunamis.xlsx');
geobubble(tsunamis,'Latitude','Longitude','SizeVariable','MaxHeight')

Change the basemap using the geobasemap function.

geobasemap colorterrain

Input Arguments

collapse all

Map on which to plot data, specified as one of the values listed in the table. Six of the basemaps are tiled data sets created using Natural Earth. Five of the basemaps are high-zoom-level maps hosted by Esri®.

'streets-light' basemap

'streets-light' (default)

Map designed to provide geographic context while highlighting user data on a light background.

Hosted by Esri.

'streets-dark' basemap

'streets-dark'

Map designed to provide geographic context while highlighting user data on a dark background.

Hosted by Esri.

'streets' basemap

'streets'

General-purpose road map that emphasizes accurate, legible styling of roads and transit networks.

Hosted by Esri.

'satellite' basemap

'satellite'

Full global basemap composed of high-resolution satellite imagery.

Hosted by Esri.

'topographic' basemap

'topographic'

General-purpose map with styling to depict topographic features.

Hosted by Esri.

'landcover' basemap

'landcover'

Map that combines satellite-derived land cover data, shaded relief, and ocean-bottom relief. The light, natural palette is suitable for thematic and reference maps.

Created using Natural Earth.

'colorterrain' basemap

'colorterrain'

Shaded relief map blended with a land cover palette. Humid lowlands are green and arid lowlands are brown.

Created using Natural Earth.

'grayterrain' basemap

'grayterrain'

Terrain map in shades of gray. Shaded relief emphasizes both high mountains and micro-terrain found in lowlands.

Created using Natural Earth.

'bluegreen' basemap

'bluegreen'

Two-tone, land-ocean map with light green land areas and light blue water areas.

Created using Natural Earth.

'grayland' basemap

'grayland'

Two-tone, land-ocean map with gray land areas and white water areas.

Created using Natural Earth.

'darkwater' basemap

'darkwater'

Two-tone, land-ocean map with light gray land areas and dark gray water areas. This basemap is installed with MATLAB®.

Created using Natural Earth.

 

'none'

Blank background that plots your data with a latitude-longitude grid, ticks, and labels.

All basemaps except 'darkwater' require Internet access. The 'darkwater' basemap is included with MATLAB.

If you do not have consistent access to the Internet, you can download the basemaps created using Natural Earth onto your local system by using the Add-On Explorer. The five high-zoom-level maps are not available for download. For more about downloading basemaps and changing the default basemap on your local system, see Access Basemaps for Geographic Axes and Charts.

The basemaps hosted by Esri update periodically. As a result, you might see differences in your visualizations over time.

Alignment of boundaries and region labels are a presentation of the feature provided by the data vendors and do not imply endorsement by MathWorks®.

Example: gx = geoaxes('Basemap','bluegreen')

Example: gx.Basemap = 'bluegreen'

Data Types: char | string

Target, specified as a GeographicAxes object, a GeographicBubbleChart object, or a GeographicGlobe (Mapping Toolbox™) object.

If you do not specify this argument, then the geobasemap function sets the basemap for the current axes, provided that the current axes is a geographic axes object or a geographic bubble chart.

Tips

  • Create custom basemaps from a URL or MBTiles file by using the addCustomBasemap (Mapping Toolbox) function.

  • When displaying a figure that contains a basemap, ensure that the attribution is visible. If the attribution is not readable, then display the attribution somewhere else on the figure, such as in the title. You can get the attribution text by using the readBasemapImage (Mapping Toolbox) function.

  • Add a basemap picker to the axes toolbar by using the addToolbarMapButton (Mapping Toolbox) function.

Version History

Introduced in R2018b

expand all