Merge imagesc and plot into same figure

19 次查看(过去 30 天)
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