right y-axis

I want to have a right y-axis to serve as some reference to the left y-axis. I do not actually need the x-axis data of the right y-axis. Any help will be much appreciated. Thanks.

回答(2 个)

VBBV
VBBV 2022-10-27

0 个投票

X = rand(20,1);
Y = X.^2 + 4;
Y1 = Y./2;
plot(X,Y);
yyaxis right % use this as 2nd yaxis with ref to 1st
plot(X,Y1)

类别

帮助中心File Exchange 中查找有关 Annotations 的更多信息

提问:

2012-3-22

回答:

2022-10-27

Community Treasure Hunt

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

Start Hunting!

Translated by