Matlab geoglobe Earth visualizations

The Mathworks has been steadily improving Matlab plotting functionality. Since Matlab R2020a, Matlab can directly create 3-D interactive plots of the Earth. Previously, it was necessary to export KML and use Google Earth for example to plot 3-D data with rendering of the Earth’s surface, so it’s nice to have the option to avoid those additional steps with external programs.

The plotting backend is WebGL, which has been used by Matlab since R2016a in uifigure. Matlab WebGL uses the GPU, including non-discrete GPUs built into the CPU as used in basic laptop PCs. The animation is generally fluid for smaller plots. With non-discrete GPU and maximized (full screen) globe plots, the GPU utilization may hit 100%, reducing the interactivity smoothness.


At this time, it appears that exportgraphics is unable to capture 3D geoglobe plot to disk–legacy functions like print() and saveas() also don’t work. This is despite exportgraphics() working for general non-geoglobe uifigures. This is a fairly serious limitation for programatically saving animated 3D data. Reach out to the Mathworks to let them know if this is an issue for you as well.


Experiment with geoplot3 and checkout the geoglobe gallery to generate a wide variety of intuitive, appealing and animated 3D plots.

fg = uifigure;


In Python, plotting data over a 3-D rendered Earth surface requires additional libraries like Mayavi or IPyParaView that serve as a frontend to VTK.