Clear Filters
Clear Filters

plots the axis scale

2 views (last 30 days)
Osita Onyejekwe
Osita Onyejekwe on 2 Feb 2017
Answered: Star Strider on 2 Feb 2017
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

Accepted Answer

Star Strider
Star Strider on 2 Feb 2017
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.

More Answers (0)

Categories

Find more on Two y-axis in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!