MATLAB Answers

Change axis colour to a user-define color

2 views (last 30 days)
Cris on 6 May 2020
Edited: dpb on 6 May 2020
I want to change the color of part of a plot label. I can do it like this:
ylabel('\color{blue}{A}, \color{orange}B, \color{yellow}C, 'interpreter', 'tex');
But I want to define my own colors, in such a way that they match the colors of the plot.
How can I do this?


Sign in to comment.

Accepted Answer

dpb on 6 May 2020
Use rgb color form:
color[rgb]{specifier} Replace specifier with a three-element RGB triplet.
\color[rgb]{0,0.5,0.5} text

  1 Comment

dpb on 6 May 2020
BTW, there's a chart of the seven (besides black) base default colors used in most plots at the doc page for text

Sign in to comment.

More Answers (0)

Translated by