Merge imagesc and plot into same figure
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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):
0 comentarios
Respuesta aceptada
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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Annotations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!