Merge imagesc and plot into same figure

3 visualizaciones (últimos 30 días)
Raúl
Raúl el 27 de Mzo. de 2013
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):

Respuesta aceptada

Doug Hull
Doug Hull el 27 de Mzo. de 2013
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 comentario
Raúl
Raúl el 3 de Abr. de 2013
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.

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by