필터 지우기
필터 지우기

Choose manually 1 out of 4 subplots which looks "best"

조회 수: 1 (최근 30일)
Ron Nativ
Ron Nativ 2023년 2월 7일
편집: Vilém Frynta 2023년 2월 7일
Hi all,
I am working on an experiment data where the latter are matrices storing topography elevations (DEMs).
For specific defined points, I am extracting cross-sections (elevaiton vs. distance) from that DEM, but would
like to choose the best direction out of a total of 4 options.
I'd first like to plot the 4 scenarios using subplot(2,2,i) where i runs from i = 1 to i = 4.
Then, I'd like to somehow choose which scenario out of the four options is the "best",
where this decision is subjective (i.e., I choose it by looking at the plot and then perhaps clicking on the one subplot which corresponds to this decision).
Any idea how to go about that?
Thanks,
Ron

답변 (1개)

Vilém Frynta
Vilém Frynta 2023년 2월 7일
편집: Vilém Frynta 2023년 2월 7일
I'm sure there are more options and ways to do it.
My idea is that at the end of the script, you would use input function. In console, you will then enter a number from 1–4, which would then result in opening another figure and plotting chosen scenario.
However, this depends on how you store your variables, which I am not very aware of. But if you are plotting with the use of for loop, this could work.
Something like...
for q = 1:4
subplot(2,2,q)
plot(x(1,q),y(1,q))
end
N = input("Which figure do you like?")
% N = number of your choice, between 1-4
figure
plot(x(N),y(N))
Hope I helped a bit.

카테고리

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