Control geographic globe appearance and behavior
Use a geographic globe to plot 3-D lines and markers over basemaps and terrain.
Create a geographic globe object using the geoglobe
function.
Basemap
— Map to plot data on'satellite'
(default) | 'darkwater'
| 'colorterrain'
| 'streets'
| custom basemap | ...Map on which to plot data, specified as one of the values listed in the table. Six of the basemaps in the table are tiled data sets created using Natural Earth. Five of the basemaps are high-zoom-level maps hosted by Esri®.
|
Full global basemap composed of high-resolution satellite imagery. Hosted by Esri. |
|
General-purpose road map that emphasizes accurate, legible styling of roads and transit networks. Hosted by Esri. |
|
General-purpose map with styling to depict topographic features. Hosted by Esri. |
|
Map designed to provide geographic context while highlighting user data on a dark background. Hosted by Esri. |
|
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. |
|
Map designed to provide geographic context while highlighting user data on a light background. Hosted by Esri. |
|
Shaded relief map blended with a land cover palette. Humid lowlands are green and arid lowlands are brown. Created using Natural Earth. |
|
Terrain map in shades of gray. Shaded relief emphasizes both high mountains and micro-terrain found in lowlands. Created using Natural Earth. |
|
Two-tone, land-ocean map with light green land areas and light blue water areas. Created using Natural Earth. |
|
Two-tone, land-ocean map with gray land areas and white water areas. Created using Natural Earth. |
|
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. | Not applicable. | Custom basemap added using the |
All basemaps except 'darkwater'
require Internet access. The
'darkwater'
basemap is included with MATLAB and Mapping Toolbox™.
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 basemaps hosted by Esri are not available for download. For more about downloading basemaps and changing the default basemap on your local system, see Access Basemaps and Terrain for Geographic Globe.
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: g = geoglobe(uifigure,'Basemap','bluegreen')
Example: g.Basemap = 'bluegreen'
Data Types: char
| string
Terrain
— Terrain data'gmted2010'
(default) | 'none'
| string scalar | character vectorTerrain data, specified as one of these values:
'gmted2010'
– Global terrain derived from the GMTED2010
model created by the U.S. Geological Survey (USGS) and National
Geospatial-Intelligence Agency (NGA).
'none'
- No terrain.
string scalar or character vector – Name of custom terrain added using the
addCustomTerrain
function.
ColorOrder
— Color orderColor order for lines plotted on the globe, specified as a three-column matrix of RGB triplets. This property defines the palette of colors MATLAB uses to create plot objects such as lines. Each row of the array is an RGB triplet. An RGB triplet is a three-element vector whose elements specify the intensities of the red, green, and blue components of a color. The intensities must be in the range [0, 1]. This table lists the default colors.
Colors | ColorOrder Matrix |
---|---|
|
[ 0 0.4470 0.7410 0.8500 0.3250 0.0980 0.9290 0.6940 0.1250 0.4940 0.1840 0.5560 0.4660 0.6740 0.1880 0.3010 0.7450 0.9330 0.6350 0.0780 0.1840] |
MATLAB assigns colors to objects according to their order of creation. For example, when plotting lines, the first line uses the first color, the second line uses the second color, and so on. If there are more lines than colors, then the cycle repeats.
Change the color order in either of the following ways:
Call the colororder
function to change the color order for all globe
objects in a UI figure. The colors of existing plots in the UI figure update
immediately. If you place additional globe objects into the figure, those globe
objects also use the new color order. If you continue to call plotting commands,
those commands also use the new colors.
Set the ColorOrder
property on the globe, call the
hold
function to set the globe
hold state to 'on'
, and then call the desired plotting
functions. This is like calling the colororder
function,
but in this case you are setting the color order for the specific globe, not the
entire UI figure. Setting the hold
state to
'on'
is necessary to ensure that subsequent plotting
commands do not reset the globe to use the default color order.
NextSeriesIndex
— SeriesIndex
value for next objectThis property is read-only.
SeriesIndex
value for the next plot object added to the
globe, returned as a whole number greater than or equal to 0
. This
property is useful when you want to track how the objects cycle through the colors in
the color order. This property maintains a count of the objects in the globe that have
a SeriesIndex
property. MATLAB uses it to assign the value of the SeriesIndex
property for each new object. The count starts at 1
when you create
the globe, and it increases by 1
for each additional object. Thus,
the count is typically n+1, where n is the
number of objects in the globe.
NextPlot
— Properties to reset'replace'
(default) | 'add'
| 'replacechildren'
| 'replaceall'
Properties to reset when adding a new plot to the globe, specified as one of these values:
'replace'
and 'replaceall'
— Delete
existing plots and reset globe properties, except Position
and Units
, to their default values before displaying the new
plot.
'add'
— Add new plots to the existing globe. Do not delete
existing plots or reset globe properties before displaying the new plot.
'replacechildren'
— Delete existing plots before displaying
the new plot. Reset the ColorOrderIndex
property to
1
, but do not reset other globe properties. The next plot
added to the globe uses the first color based on the ColorOrder
property.
Position
— Size and location[0 0 1 1]
(default) | four-element vector of form [left bottom width height]
Size and location, specified as a four-element vector of the form [left
bottom width height]
. By default, MATLAB measures the values in units normalized to the container. To change the
units, set the Units
property.
The left
and bottom
elements define
the distance from the lower left corner of the container UI figure, panel, or
tab to the lower left corner of the position boundary.
The width
and height
elements are the
position boundary dimensions.
Units
— Position units'normalized'
(default) | 'inches'
| 'centimeters'
| 'points'
| 'pixels'
| 'characters'
Position units, specified as one of these values.
Units | Description |
---|---|
'normalized' (default) | Units normalized with respect to the container, which is typically the figure or a panel. The
lower left corner of the container is (0,0) and
the upper right corner is (1,1) . |
'inches' | Inches. |
'centimeters' | Centimeters. |
'characters' | Units based on the default
|
'points' | Typography points. One point equals 1/72 inch. |
'pixels' | Pixels. Distances in pixels are independent of your system resolution on Windows® and Macintosh systems.
|
When specifying the units as a name-value pair during object creation, specify the
Units
name-value pair before specifying name-value pairs that
use those units, for example Position
.
Visible
— State of visibility'on'
(default) | 'off'
State of visibility, specified as one of these values:
'on'
— Display the object.
'off'
— Hide the object without deleting it. You
still can access the properties of an invisible object.
Parent
— Parent containerFigure
object created using
uifigure
| Panel
object | Tab
objectParent container, specified as a Figure
object created using the
uifigure
function, a Panel
object within a UI
figure, or a Tab
object within a UI figure.
Children
— ChildrenGraphicsPlaceholder
array | array of Line
objectsChildren, returned as an array of graphics objects. Use this property to view a list of the children or to reorder the children by setting the property to a permutation of itself.
You cannot add or remove children using the Children
property.
To add a child to this list, set the Parent
property of the child
graphics object to the GeographicGlobe
object.
HandleVisibility
— Visibility of object handle'on'
(default) | 'off'
| 'callback'
Visibility of the object handle in the Children
property of the
parent, specified as one of these values:
'on'
— Object handle is always visible.
'off'
— Object handle is invisible at all times.
This option is useful for preventing unintended changes by another function. Set
the HandleVisibility
to 'off'
to
temporarily hide the handle during the execution of that function.
'callback'
— Object handle is visible from within
callbacks or functions invoked by callbacks, but not from within functions
invoked from the command line. This option blocks access to the object at the
command line, but permits callback functions to access it.
If the object is not listed in the Children
property of the
parent, then functions that obtain object handles by searching the object hierarchy or
querying handle properties cannot return it. Examples of such functions include the
get
, findobj
, and close
functions.
Hidden object handles are still valid. Set the root
ShowHiddenHandles
property to 'on'
to list
all object handles regardless of their HandleVisibility
property
setting.
Type
— Type of graphics object'globe'
This property is read-only.
Type of graphics object returned as 'globe'
.
Tag
— Object identifier''
(default) | character vector | string scalarObject identifier, specified as a character
vector or string scalar. You can specify a unique Tag
value to
serve as an identifier for an object. When you need access to the object elsewhere in
your code, you can use the findobj
function to search for the object
based on the Tag
value.
UserData
— User data[]
(default) | arrayUser data, specified as any MATLAB array. For example, you can specify a scalar, vector, matrix, cell array, character array, table, or structure. Use this property to store arbitrary data on an object.
If you are working in App Designer, create public or private properties in the app
to share data instead of using the UserData
property. For more
information, see Share Data Within App Designer Apps.
Change Hold State and Basemap
hold | These
|
geobasemap | This
|
Change View
campos | Set or query position of camera for geographic globe |
camheight | Set or query height of camera for geographic globe |
camheading | Set or query heading angle of camera for geographic globe |
campitch | Set or query pitch angle of camera for geographic globe |
camroll | Set or query roll angle of camera for geographic globe |
Display a geographic globe in a figure created using the
uifigure
function.
uif = uifigure; g = geoglobe(uif);