Automatically selecting corresponding points in a subplot

조회 수: 8 (최근 30일)
Nicola Londero
Nicola Londero 2021년 7월 13일
답변: Hrishikesh Borate 2021년 7월 21일
Hello,
Right now i'm doing some data analysis of some RC Planes flights, in particular i'm interested in the speed, altitude and vario (time derivate of the altitude) obtained from a GPS Logger.
What I would like to get in the end is a subplot having the speed in subplot(2,2,1), the altitude and vario in subplot(2,2,3) and lastly in subplot(2,2,[2 4]) a sketch of the flight "seen from above" obtained from the latitude and longitude, and i can do this. What I'm not able to do is making it in a way that just by selecting a generic point in one subplot the corresponding point is selected in the other 2 subplots automatically. I'm also open to change the way the plots are shown, using multiple plots instead of a subplot, but if possible i would prefer avoiding the solution of making the flight path plot line of a scaling color depending on another variable (speed or altitude)
I'll add a picture of the actual subplot.
Thank you for the help and the answers.

채택된 답변

Hrishikesh Borate
Hrishikesh Borate 2021년 7월 21일
Hi,
The following code demonstrates an approach to show the corresponding points in the other subplots when a point is selected in one of the subplots.
n =10;
xdata = 1:n;
y1data = rand(1,n)*2;
y2data = rand(1,n)*3;
subplot(1,2,1)
plot(xdata, y1data);
subplot(1,2,2)
plot(xdata, y2data);
linkdata showdialog;
linkdata on;
brush on;
For more information, refer linkdata and brush.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Subplots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by