MATLAB: Create diagram where y axis has zero limits two times (-1 to 0,0 to 0,0 to 1)

diagramy axis

Greeting to everyone,
I am trying to write a code that draws a curve like the one in the picture that I attach.My problem is that I cannot find how to set the y axis to take values from -1 to 0,0 to 0,0 to 1. Is it possible to do this in matlab and if so how?
I hope the picture clarifies the problem.Just look at the y values.
Any help would be highly appreciated.Thanks in advance

Best Answer

This will get you started. I include most of the properties you will need to make it look right. You should look at the other axes properties. In particular the 'Ydir' property might come in useful.
ax(1) = axes('pos',[.1 .2 .8 .2],...
'ylim',[-1 0])
ax(2) = axes('pos',[.1 .4 .8 .2],...
'xtick',[],'xcolor','w',...
'ylim',[0 1]);