How can I align an imagesc subplot with a line subplot?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am trying to align an image with a graph of the vertical sum of the image (a kind of image profile). But I cannot get the line plot's width to align with the imagesc of the plot above it. This is what I've tried:
A = randn(40);
sumA = sum(A)
h1 = subplot(211);
p1 = get(h1, 'pos');
imagesc(A), axis equal, axis off
h2 = subplot(212);
p2 = get(h2, 'pos');
p2(3) = p1(3);
set(h2, 'pos', p2);
plot(sumA)
The output is as shown in the image attached:
As you can see, the graph is much wider than the matrix shown by imagesc.
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Subplots 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!