フィルターのクリア

Combine scatter3 with a map plot?

3 ビュー (過去 30 日間)
HRmatlab
HRmatlab 2017 年 12 月 6 日
回答済み: Chad Greene 2018 年 5 月 30 日
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
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')

Community Treasure Hunt

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

Start Hunting!

Translated by