change the color of the second Y-axis

20 ビュー (過去 30 日間)
SIEF ADDEEN
SIEF ADDEEN 2024 年 2 月 27 日
回答済み: Voss 2024 年 2 月 27 日
ı 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

回答 (1 件)

Voss
Voss 2024 年 2 月 27 日
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

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by