Color Letters to define in plotting

179 ビュー (過去 30 日間)
Muhammad Zafar Iqbal
Muhammad Zafar Iqbal 2020 年 5 月 4 日
編集済み: Mehmed Saad 2020 年 5 月 4 日
Hi
There are some letters used for colors in matlab like
  • b: blue. g: green. r: red. c: cyan. m: magenta. y: yellow. k: black. w: white.
there are many other colors (mix) like sky blue, Orange, or any combination? I just want to use in a command like plot(Z,'color')

回答 (1 件)

Mehmed Saad
Mehmed Saad 2020 年 5 月 4 日
編集済み: Mehmed Saad 2020 年 5 月 4 日
Predifined Color
figure,plot(1:10,'Color','red')
User defined Color
figure,plot(1:10,'Color',[r g b])
where r, g an b are rgb content of color (normalized or percentage of color). For example
The Rgb value of my selected color is [71 72 133] and i ve to normalize it by max value and max value of color is 255 or 256 so divide it by 256.
rgb = [71 72 133]/256;
figure,plot(1:10,'Color',rgb,'LineWidth',10)

カテゴリ

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

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by