필터 지우기
필터 지우기

Plotting multiple graphs using "imagesc"

조회 수: 33 (최근 30일)
tinkyminky93
tinkyminky93 2022년 3월 17일
답변: Walter Roberson 2022년 3월 17일
Hello, I am trying to plot the Range-Doppler map using imagesc. When I plot my outputs individually, they work fine but when I try to put two graphs into one plot simultaneously, it shows wrong values. How can I plot them in the same graph with correct values?
  • I tried "hold on" command but it just deletes the first imagesc than plots the second imagesc
  • I also tried imagesc([abs(data1), abs(data2)], 'XData', (x));
Can you give me another syntax or have you got any advice to plot them? Thank you.
  댓글 수: 1
KSSV
KSSV 2022년 3월 17일
You want one image above the other? Will it give a clear view?

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2022년 3월 17일
imagesc() works by doing image() and then setting the CLim property of the axes. If you were to imagesc() more than one item in the axes, then it is not going to work unless both of the matrices happen to have the same range.
What you should probably do instead is use rescale() and image() the result. However, if you need the data cursor to work correctly on both images, then sometimes it is easiest to use two different axes (that overlap each other) so that their CLim can be set independently.
See also the File Exchange contribution "freezecolors"

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by