필터 지우기
필터 지우기

Merge imagesc and plot into same figure

조회 수: 6 (최근 30일)
Raúl
Raúl 2013년 3월 27일
Hi all,
My code creates an imagesc figure from a matrix and later on, it creates a plot from two arrays. It works properly separately.
I would like to merge both figures, where the imagesc should fit into the plot. The problem is that the plot goes to a corner of the imagesc figure. I need the plot much bigger and the imagesc figure in the center of it.
I'm using hold on and hold off.
This is what i'm getting
This is what i would like to get (done with paint):

채택된 답변

Doug Hull
Doug Hull 2013년 3월 27일
i = magic(10)
imagesc(i)
imagesc(10:10:100, 10:10:100,i)
When you call imagesc, if you do not give an X and Y vectors, they default to the indices (1 through number of pixels)
When you do a plot, the plot is at a different scale on the X and Y. In the above example, I changed the X and Y vectors. you could choose appropriate X and Y vectors to scale the image to the plot.
  댓글 수: 1
Raúl
Raúl 2013년 4월 3일
Thanks Doug for the answer. It works but I would like to make the plot bigger.
I obtain this figure
https://www.dropbox.com/s/ei4f17kjgspw48l/test3.jpg
And I would like to get this example:
https://www.dropbox.com/s/r85n0o2k5ep8njj/2%2C5_0%2C8_0%2C05_Monopulse_20130304AB_SuB_2%2C5m_42cm_30-31%2C5.png
This is my part of code related with plot
plot(x,y,'-rd')
Thanks a lot.
Raúl.

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by