Does anyone know how can I create the colours brown,violet and orange?

215 ビュー (過去 30 日間)
Pul
Pul 2021 年 11 月 6 日
コメント済み: Pul 2021 年 11 月 8 日
Hello everyone,
I would like to change the colors "yellow" into brown, violet and orange in my script (obviously, in three different lines)
yyaxis right
plot(year.DateA, year.year_values,'y-^' ,'MarkerEdgeColor','k','MarkerFaceColor','y')
How can I do it?
Thank you!

採用された回答

Star Strider
Star Strider 2021 年 11 月 6 日
My best attempts —
brwn = [200 100 16]/256;
vlet = [160 81 151]/256;
orng = [240 100 10]/256;
figure
patch([0 1 1 0], [0 0 1 1], brwn)
hold on
patch([0 1 1 0]+1, [0 0 1 1], vlet)
patch([0 1 1 0]+2, [0 0 1 1], orng)
hold off
.
  12 件のコメント
Pul
Pul 2021 年 11 月 7 日
I don't know why it doesn't work on my MATLAB; I have MATLAB 2021a!
Star Strider
Star Strider 2021 年 11 月 7 日
The usual first approach to something like this is to re-start MATLAB and try it again.

サインインしてコメントする。

その他の回答 (1 件)

Pul
Pul 2021 年 11 月 7 日
Yes, I tried, but it didn't work.
  4 件のコメント
Star Strider
Star Strider 2021 年 11 月 8 日
As always, my pleasure!
Please follow up when you get this working, and describe what the eventual solution turned out to be. I am curious, and others can likely benefit.
.
Pul
Pul 2021 年 11 月 8 日
Yes, I keep you posted.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by