How can you plot lines of latitude and longitude on a globe without using the mapping toolbox ?
Show older comments
I have a function that displays the countries of the world on a global plot and I need to know how to plot lines of lat and lon in even increments of 10 degrees onto this global plot without using the geoshow command found in the mapping toolbox.
3 Comments
KSSV
on 25 Jul 2017
You need to change the long and lat data from degrees to spherical coordinates and then use surf...
Rik
on 25 Jul 2017
You could even use plot3 to generate the wire mesh.
As to examples: spherical coordinates work similar to polar coordinates (x=r*sin(theta),y=r*cos(theta)), so you can expand that to 3D without too much trouble.
per isakson
on 26 Jul 2017
Accepted Answer
More Answers (1)
Chad Greene
on 8 Mar 2019
1 vote
I turned my answer into a collection of functions called globeplot, globesurf, globegraticule, globeborders, etc. which you can find in the Climate Data Toolbox for Matlab.
2 Comments
Margareta
on 8 Mar 2019
Dear Chad,
thank you so much for sharing the "half Earth" code example earlier (last September), and for also going to the trouble of providing this really nice and nifty set of functions as part of the CD toolbox!
Cheers from Sweden!
Maggie
Chad Greene
on 8 Mar 2019
Thanks so much for saying that, Maggie!
Categories
Find more on 3-D Visualization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


