Stacking one subplot on top of other.

1 vue (au cours des 30 derniers jours)
Bibek Dhami
Bibek Dhami le 17 Mai 2019
I am trying to stack one subplot on the top of other. The problem is that I couldn't put whole figure in a box. Also I want the figure only to show the tick marks at specified points only. In y scale I want it to show the scale in 10, 100 and 1000 rather than power of 10.
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]);

Réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by