change the color of the second Y-axis

29 Ansichten (letzte 30 Tage)
SIEF ADDEEN
SIEF ADDEEN am 27 Feb. 2024
Beantwortet: Voss am 27 Feb. 2024
ı just want to change the color of the y axis to black how can i do this could you please write the code to change this

Antworten (1)

Voss
Voss am 27 Feb. 2024
yyaxis('left')
plot(1:10);
yyaxis('right')
plot(10:-1:1)
ax = gca(); % the current axes is the right axes at this point
ax.YColor = 'k'; % set the right axes YColor to black

Kategorien

Mehr zu 2-D and 3-D Plots 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