Stacking one subplot on top of other.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/219915/image.jpeg)
a=subplot(2,1,2);
surf(A(2:end,1)',A(1,2:end)',A(2:end,2:end)','edgecolor','none');
view(2);
xlim([350 450]);
set(gca,'XTick',[350 370 390 410 430 450]);
ylim([-1 1]);
yticks([-1 0 1]);
caxis([-0.02 0.01]);
set(gca,'TickDir','out'); % The only other option is 'in'
colorbar;
set(colorbar,'Position',[ 0.66 0.2 0.03 0.6]);% set the position and size of colorbar as width and height
b=subplot(2,1,1);
surf(A(2:end,1)',A(1,2:end)',A(2:end,2:end)','edgecolor','none');
view(2);
set(gca,'yscale','log');
xlim([350 450]);
ylim([1 3000]);
b.XAxis.Visible='off';
caxis([-0.02 0.01]);
grid off; % removes line between two subplots
set(gca,'XTick',[]);
%set(gca,'TickDir','out'); % The only other option is 'in'
yticks([ 10 100 1000]);
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Subplots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!