MATLAB: HI, i want to do this type of graphic, but i do not how and if it is possible.

graphics

I have used series of data which have the same axis x but are at different scales on the axis and because of this I want to keep the x axis constant but vary the number of graphs as shown in the image.

Best Answer

ax(1)=subplot(3,1,1)
plot(rand(10,10))
ax(2)=subplot(3,1,2)
plot(rand(10,10))
ax(3)=subplot(3,1,3)
plot(rand(10,10))
%%link x-rulers
linkaxes(ax,'x')
%%omit xticklabels from all but the bottom one
set(ax(1:end-1),'xticklabels',{})
The function stackedplot was also introduced recently