Graph flight plans on a 3d globe with MATLAB Mapping Toolbox and Plotly

Traveling somewhere soon? Visualize your flight plan on a 3d globe with the Matlab Mapping Toolbox and Plotly!

If you haven’t used Plotly with Matlab before it’s easy to get started by following these simple instructions. Additionally, latitude & longitude flight plan data can be found online on sites such as Flight Plan Database.

With the Matlab Mapping Toolbox, construct a basic globe display.

Next, add low-resolution global topography, coastlines, and rivers to the globe.

To add a flight plan, create arrays of the latitude and longitude data for the flight, then plot the latitude by longitude.

Parse the figure with the following statement:

Adjust the trace style (color and line width) on the Plotly figure for {1} Latitude, {2} Longitude, {3} Surface Water, {4} Land Lines, {5} Rivers, and {6} Flight Plan

For lines (in this example: everything except Surface Water):

For surfaces (in this example: Surface Water):

Adjust the layout and axes.

In the graph below, the axes grids are hidden. Repeat the code below for the y and z axes to hide all grid information in the plot.


Finally, graph the figure online with Plotly!


You can find the full matlab script and data used to make the flight plans for the figure below here!

Creating dashboards or visualizations at your company? Consider Plotly Enterprise for modern intracompany graph and data sharing.