## File Exchange Pick of the WeekOur best user submissions

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English version of the page.

# MATLAB Basemap Data (R2017b)3

Posted by Jiro Doke,

Jiro‘s pick this week is MATLAB Basemap Data by MathWorks Mapping Team.

In the new R2017b release, there is a new interactive geographic function called geobubble which displays bubbles at geographic locations, with the size and color representing other parameters.

tsunamis = readtable('tsunamis.xlsx');
tsunamis.Cause = categorical(tsunamis.Cause);
gb = geobubble(tsunamis,'Latitude','Longitude', ...
'SizeVariable','MaxHeight','ColorVariable','Cause')

gb =
GeographicBubbleChart with properties:

Basemap: 'darkwater'
MapLayout: 'normal'
SourceTable: [162×20 table]
LatitudeVariable: 'Latitude'
LongitudeVariable: 'Longitude'
SizeVariable: 'MaxHeight'
ColorVariable: 'Cause'

Use GET to show all properties


We can focus on a particular area, for example North America, with geolimits.

geolimits([10 65],[-180 -60])


The background image you see is the basemap. By default, the basemap you’re seeing here is called “darkwater” and is included with the product. You can change the Basemap property to five other maps: grayland, bluegreen, colorterrain, grayterrain, landcover. These maps are automatically accessed over the Internet. For those with no or low Internet connection, they can download an offline version of the maps.

grayland

gb.Basemap = 'grayland';
pause(2)


bluegreen

gb.Basemap = 'bluegreen';
pause(2)


colorterrain

gb.Basemap = 'colorterrain';
pause(2)


grayterrain

gb.Basemap = 'grayterrain';
pause(2)


landcover

gb.Basemap = 'landcover';
pause(2)


EDIT (to illustrate the exploratory nature of geobubble, as mentioned by Rob):

One of the use cases for geobubble is interactive exploration. For example, I can zoom in with my mouse to see a particular location in greater detail.

R2017b

There are plenty of new, great features in the new R2017b. Take a look at what’s new.

Give it a try and let us know what you think here or leave a comment for the MathWorks Mapping Team.

Get the MATLAB code

Published with MATLAB® R2017b

### Note

Joanne Williams replied on : 1 of 3

This at first glance looks really useful, and I had a long comment I’ve just deleted whilst looking up the relative areas of Greenland and Africa… is this really only available for the Mercator projection? It’s a terrible choice for these purposes, and only used in geoscience if you absolutely have to preserve angle at all scales, (which is why google maps and spin-offs use it.) Try plotting a dot on the north/south pole!

Also these plots tend to distort the perception of the data by overlaying one set of dots on another. In the example here there are purple dots almost buried by the blue. It can be really dangerous if you’ve first sorted the data! A better approach is to merge neighbouring dots to create larger bubbles, and/or use transparency. Does this method provide that? Does it warn the user if dots are hidden? If not, what’s the advantage over a simple scatterplot? (Sorry I can’t test it properly as I’ve only got access to 2016b).

Oh, also if I was reviewing a paper I’d probably object to the 6 significant figure bubble size on the legend… a method of rounding there is required, like you would on a normal x-y axis label.

Rob Comer replied on : 2 of 3