Combine scatter3 with a map plot?
Show older comments
I have flight data (Longitude, Latitude, Altitude, property_x) from an airborne experiment. The data is plotted and colored by property_x using the scatter3 function: scatter3(Longitude, Latitude, Altitude, point size, property_x); This works very well and produces the desired 3D plot and I can easily set the colorbar and its limits. However, I was trying to find a way to plot this over a specific geographical area map defined by the Longitude, Latitude limits. In other words, I want to the existing scatter3 plot to be over a map in the XY plane. I have not found a way to do this.
Alternatively, I generated the desired map and used plot3m to plot my data but plot3m does not use a colorbar and it's not easy to adjust the colors of the flight data.
Any help would be greatly appreciated. Thank you
Answers (1)
Chad Greene
on 30 May 2018
You can do the coordinate transformation yourself and plot over a map pretty easily. First, make the base map just as if you were about to use plot3m. Then do this:
[x,y] = mfwdtran(lat,lon),
scatter3(x,y,z,30,c,'filled')
Categories
Find more on Vector and Raster Map Display in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!