geobubble
Standalone geographic bubble chart
Syntax
Description
Table Data
geobubble(
creates a standalone geographic bubble chart from the specified latitude and longitude
coordinates. The tbl
,latvar
,lonvar
)tbl
argument indicates the table that contains the
coordinates. The latvar
argument indicates the table variables that
contains latitudes. The lonvar
argument indicates the table variables
that contains longitudes. By default, all the bubbles are the same size and color.
Vector Data
geobubble(
specifies the colors of the bubbles using the categorical values in
lat
,lon
,sizedata
,colordata
)colordata
. The function chooses a color for each category in
colordata
, plus one additional color for any elements of
colordata
that are undefined. The function selects colors from an
ordered list of seven standard colors. If your data specifies more than seven categories,
then the function cyclically repeats the colors.
Additional Options
geobubble(___,
specifies Name=Value
)GeographicBubbleChart
properties using name-value arguments.
Specify the properties after all other input arguments. For example, the
SizeVariable
and ColorVariable
properties
enable you to specify table variables that determine the sizes and colors of the bubbles.
For a list of properties, see GeographicBubbleChart Properties.
geobubble(
creates
the geographic bubble chart in the figure, panel, tab, or tiled chart layout specified by
parent
,___)parent
.
returns the
gb
= geobubble(___)GeographicBubbleChart
object. Use gb
to modify
properties of the chart after creating it. For a list of properties, see GeographicBubbleChart Properties.
Examples
Input Arguments
Output Arguments
More About
Tips
If you create a geographic bubble chart from a table, then you can customize its data tips.
To add or remove a row from the data tip, right-click anywhere on the chart and point to Modify Data Tips. Then, select or deselect a variable.
To add or remove multiple rows, right-click on the chart, point to Modify Data Tips, and select More. Then, add variables by clicking >> or remove them by clicking <<.
To programmatically bring focus to a geographic bubble chart, use the
axes
function, for exampleaxes(gb)
.When you plot on geographic axes, the
geobubble
function assumes that coordinates are referenced to the WGS84 coordinate reference system. If you plot using coordinates that are referenced to a different coordinate reference system, then the coordinates might appear misaligned.
Alternative Functionality
Geographic bubble charts do not support customizations such as changing the line width of bubbles, changing the transparency of bubbles, or adding text and line annotations. To create a similar chart that supports more customizations, create a bubble chart in a geographic axes by using the
geoaxes
andbubblechart
functions. For an example that shows how to create such a chart, see Combine Bubble Chart with Other Graphics in Geographic Axes.To create a bubble chart in a map axes object (Mapping Toolbox™), use the
bubblechart
function.
Version History
Introduced in R2017b