How can I create another y-axis on right side?

조회 수: 2 (최근 30일)
Umang Dongre
Umang Dongre 2019년 2월 26일
댓글: Umang Dongre 2019년 2월 26일
How can I create another two axis in same figure?
x=A0006_charge(:,1);
y=A0006_charge(:,2);
a=A0006_charge(:,3);
z=A0006_charge(:,4);
plot(a, x, a, y, a, z);
I tried "yyaxis right" but its not working.

채택된 답변

Stephan
Stephan 2019년 2월 26일
편집: Stephan 2019년 2월 26일
Hi,
use yyaxis. For example:
x=A0006_charge(:,1);
y=A0006_charge(:,2);
a=A0006_charge(:,3);
z=A0006_charge(:,4);
yyaxis left
plot(a, x, a, y)
yyaxis right
plot(a, z);
Best regards
Stephan
  댓글 수: 1
Umang Dongre
Umang Dongre 2019년 2월 26일
Thank You,
I tried this but it saying ...
Undefined function 'yyaxis' for input arguments of type 'char'.
Error in Charge (line 5)
yyaxis left

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by