第二軸の軸の色を変える方法について

65 visualizaciones (últimos 30 días)
Taiga Miyashita
Taiga Miyashita el 2 de Oct. de 2020
Respondida: Naoya el 5 de Oct. de 2020
このようなグラフで右側の第2軸の色を黒色に変更したいのですが,適切なやり方が分かりません.
ご教授いただけますと幸いです.よろしくお願いいたします.
  3 comentarios
Taiga Miyashita
Taiga Miyashita el 5 de Oct. de 2020
NAOYA様
ご回答いただきましてありがとうございます.
示していただいたコードで軸を黒色に変更することが出来ました.
自身のグラフの作り方が粗く,軸を指定することが出来ていなかったのが原因でした.
ありがとうございました.
Naoya
Naoya el 5 de Oct. de 2020
ありがとうございます。解決されたようで安心しました。
それでは念のために "回答" として情報を残しておきます。

Iniciar sesión para comentar.

Respuesta aceptada

Naoya
Naoya el 5 de Oct. de 2020
例えば以下の様に yyaxis で 2軸を作成した場合は
カレントのaxis に 2種類の YAxis が含まれますので
その 2つめの YAxis に対して色を明示指定することで
右側の軸の色を黒に変更することはできます。
>> yyaxis left;
>> ax = gca;
>> ax.YAxis(2).Color = [0 0 0];

Más respuestas (0)

Categorías

Más información sobre 2 次元および 3 次元プロット en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!