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

20 views (last 30 days)
Pul
Pul on 6 Nov 2021
Commented: Pul on 8 Nov 2021
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!

Accepted Answer

Star Strider
Star Strider on 6 Nov 2021
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 Comments
Star Strider
Star Strider on 7 Nov 2021
The usual first approach to something like this is to re-start MATLAB and try it again.

Sign in to comment.

More Answers (1)

Pul
Pul on 7 Nov 2021
Yes, I tried, but it didn't work.
  4 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!