Matlab colors required in latex

27 ビュー (過去 30 日間)
shane watson
shane watson 2020 年 1 月 28 日
コメント済み: shane watson 2020 年 2 月 5 日
Hello all,
I draw 3 plots using bar. Now I need to caption my figure using text highlight with color code given below, I'm writing this in latex so I need this in latex, I know it's not 100% related question but someone atleast guide me about these color that match with latex,The color code I used (1) 'FaceColor',[0 1 0] (2)'FaceColor',[0.4940 0.1840 0.5560] (3) 'FaceColor',[0.3010 0.7450 0.9330].
Text highlighter
  2 件のコメント
Walter Roberson
Walter Roberson 2020 年 1 月 28 日
At the moment the only construct that I have been able to get to work is \color{NAMEDCOLOR} with interpreter tex
I would expect more flexibility with Report Generator as that supports \usepackage
Adam Danz
Adam Danz 2020 年 1 月 28 日
編集済み: Adam Danz 2020 年 1 月 28 日
I also am not aware of a latex method.
Demo using tex interpreter and rgb values
axes()
txt = sprintf('\\color[rgb]{%f, %f, %f}%s', [0.4940 0.1840 0.5560] , 'MyTextLabel');
text(.5, .5, txt, 'Interpreter', 'tex')
or just
text(.5, .5, 'MyTextLabel', 'Color', [0.4940 0.1840 0.5560])

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

回答 (1 件)

shane watson
shane watson 2020 年 1 月 31 日
Thanks Adam and Walter for the answer. I found this, I think it would be help ful for anyone who sees this quesiton.
  2 件のコメント
Adam Danz
Adam Danz 2020 年 1 月 31 日
There's lots of RGB color code websites out there. Here's another decent one.
All you need to do is divide the rgb values by 255 to normalize them. For example, if the RGB values are [204, 0, 102], normalize them with [204, 0, 102]/255.
shane watson
shane watson 2020 年 2 月 5 日
Thank Adam Danz for the answer.

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

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by