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

1 Ansicht (letzte 30 Tage)
Umang Dongre
Umang Dongre am 26 Feb. 2019
Kommentiert: Umang Dongre am 26 Feb. 2019
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.

Akzeptierte Antwort

Stephan
Stephan am 26 Feb. 2019
Bearbeitet: Stephan am 26 Feb. 2019
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 Kommentar
Umang Dongre
Umang Dongre am 26 Feb. 2019
Thank You,
I tried this but it saying ...
Undefined function 'yyaxis' for input arguments of type 'char'.
Error in Charge (line 5)
yyaxis left

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by