MATLAB: Plots the axis scale

axiisplots

I have two plots with the same x-axis but their y-axis are scaled differently. how do I make them the same scale?
Here is my plots command
zero_vector = zeros(size(Standard_error_positive_INFLP)); % just the straight line
% zero_vector = zeros(1,min(size(Z_pbw,1),size(W,1)));
figure(1)
plot(Confidence_interval_Negative_INFLPS(1,:), '-b')
title('Negative Inflection Points Confidence Interval')
hold on
plot(Confidence_interval_Negative_INFLPS(2,:), '-b')
%plot(, 'rp')
plot(zero_vector) % plot straight line at zero
hold off
figure(2)
plot(Confidence_interval_Positive_INFLPS(1,:), '-b')
title('Positive Inflection Points Confidence Interval')
hold on
plot(Confidence_interval_Positive_INFLPS(2,:), '-b')
% plot(, 'rp')
plot(zero_vector) % plot straight line at zero
hold off

Best Answer

You may have to use two y-axes, with the new yyaxis or older plotyy functions.
Also see the documentation on Axes Properties (link) if you need to adjust either one to create the scaling you want.
Related Question