Filter löschen
Filter löschen

How to plot a graph with geographic coordinates

7 Ansichten (letzte 30 Tage)
Paolo Michele Carbone
Paolo Michele Carbone am 24 Mai 2019
Beantwortet: Abhinaya Kennedy am 11 Jun. 2024
Hi,
I need to draw a graph where the nodes have a geographic coordinates; i know that the function "gplot" allow you to draw a graph once you give the coordinates of the nodes and adjacency matrix, but it works only in cartesian coordinate system; is it possible to do something similar but with latitute and longitude as coordinates?

Akzeptierte Antwort

Abhinaya Kennedy
Abhinaya Kennedy am 11 Jun. 2024
While "gplot" works for cartesian coordinates, MATLAB provides functions specifically designed for geographic data.
"geoplot" allows you to plot lines or markers on a map based on latitude and longitude coordinates. To do so,
  1. Define your latitude and longitude vectors ("lat" and "lon").
  2. Create the adjacency matrix representing your graph connections.
  3. Use "geoplot(lat, lon)" to plot the nodes as markers on a map.
You can also refer to:

Weitere Antworten (0)

Kategorien

Mehr zu Geographic Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by