How to plot a map like this in Matlab?

23 visualizaciones (últimos 30 días)
Leon
Leon el 31 de Oct. de 2021
Respondida: Kelly Kearney el 3 de Nov. de 2021
The attached map was created using GMT based on the Earth Relief data. I wonder if anyone knows how to plot it using Matlab?
Many thanks!
  2 comentarios
Jaya
Jaya el 31 de Oct. de 2021
I never tried something like this but you might want to see the accepted answer in this link. https://www.mathworks.com/matlabcentral/answers/79113-how-to-generate-a-geographical-heat-map-worldwide-country-level-granularity
Morten Sparre Andersen
Morten Sparre Andersen el 2 de Nov. de 2021
If you have access tio GMT, it may be more convenient making the map in GMT. Otherwise, the Mapping toolbox may be your best bet for a quick fix to your problem.
However, if you have the time, find the right projection, create the code to generate an X an Y array from the Lat-Lot data. If you interpolates to a regular grid, you may use imagesc to create the topographic grid. however, you can get a preview using mesh.
Next draw geodetic grid on top, if required.
You can find geodetic to UTM and back packages on the Matlab Central.
Good luck, Morten

Iniciar sesión para comentar.

Respuestas (1)

Kelly Kearney
Kelly Kearney el 3 de Nov. de 2021
Do you want to replicate that plot exactly, or just the general concept? If the former, I'd recommend looking at m_map, since it allows for a similar map border style, colormaps, etc. With the Mapping Toolbox, you should be able to get a close replica, though:
worldmap('north america')
geoshow('landareas.shp', 'facecolor', 'none')
Both m_map and the Mapping toolbox include a variety of options for plotting projected raster data, but you'll have to download the desired terrain data prior to that.

Categorías

Más información sobre Mapping Toolbox en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by