O'Reilly logo

MATLAB Graphics and Data Visualization Cookbook by Swapnonil Banerjee, Nivedita Majumdar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Flow maps

Flow maps are a mix of maps and flow charts depicting the movement of objects from one location, indicating information such as what is flowing, the direction of the flow, source and destination, how much is flowing, and so on.

Getting ready

In this recipe, you will show the itinerary of a travel plan to tour Italy. Load the data:

load romanHoliday

Note that the Google developer API was used to obtain the map at runtime. So you will need an Internet connection for this recipe to successfully execute.

How to do it…

Perform the following steps:

  1. Get the map using a Google Map static image API:
    %% Parameter Definition height = 640; width = 640; % construct the query string with all the lat/lonvalues pos = []; for i = 1:length(Lats)-1 pos= [posnum2str(Lats(i)) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required