Combine scatter3 with a map plot?
显示 更早的评论
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
回答(1 个)
Chad Greene
2018-5-30
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')
类别
在 帮助中心 和 File Exchange 中查找有关 Vector and Raster Map Display 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!