MATLAB: Modify a certain section of the axis while keeping the rest

plotspacingstairs

Hi everyone, I'm produced this plot using this codes
figure
z1 = stairs(x1, y1, 'LineWidth',1)
hold on;
z2 = stairs(x2, y2, 'LineWidth',1)
hold on;
z3 = stairs(x3, y3, 'LineWidth',1)
hold on;
z4 = stairs(x4, y4, 'LineWidth',1)
grid
I'm wondering if its possible to keep the axis between 0.975 to 0.995 then modify the spacing between 0.995 to 1 (as indicated by the red box) to show certain values such 0.99757953, 0.99758321, 0.99758452, 0.99758671, 0.99905220, 0.99992986, 0.99993039, 0.99993380, 0.99993599, 0.99993730,0.99993861 which are lumped into a line (i'm sure there are also in stairs but can't see from this graph)
Figure.png

Best Answer

Try this one?
x1=..;
y1=..:
so on .....x2,y2,x3,y3....
figure, z1 = stairs(x1, y1, 'LineWidth',1)
hold on;
z2 = stairs(x2, y2, 'LineWidth',1)
z3 = stairs(x3, y3, 'LineWidth',1)
z4 = stairs(x4, y4, 'LineWidth',1)
xlim([0.975 0.995]);
xticks([%..decide tick level....]);
grid on;
xticks detail