Altering axes in subplot
Ältere Kommentare anzeigen
I have a matrix whose values change with each iteration, and this matrix I plot. A minimal example is the following
figure(1)
a=ones(11, 11);
for i=1:20
a(2, 3) = 1+a(2, 3);
a(1, 4) = 1+a(1, 4);
subplot(1,2,1), imagesc(a)
subplot(1,2,2), imagesc(a)
pause(0.1)
end
I would like to do the following:
1. On the plot to the left (they are identical only in this example..) I would like the x-axis to start at 0. If i use `xlim([0 11])` the first column (belonging to 0) is just white. Is there a way to circumvent this?
2. I would like for the left y-axis to run from `-5..5`.
Is there a way to achieve this? Thanks in advance.
1 Kommentar
Jan
am 5 Jan. 2014
The question is not clear yet. What do you want to appear instead of the white column? What about ylim([-5 5])?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Subplots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!