Trying to use 6 different shades of gray on stacked bar

3 ビュー (過去 30 日間)
Sohil Shrestha
Sohil Shrestha 2019 年 5 月 4 日
コメント済み: Adam Danz 2019 年 5 月 5 日
Hello,
I am trying to create a gray scaled stacked bar plot. I have set the bar.FaceColor = 'flat' and CData to different rgb triplet with identical element to get the gray scale legend(or gray(6)).
The issue is it is pretty hard to distinguish between the different stacks in the bar. Here you can see DataType and RunMutant and pretty similar and so is Mutant Gen and Coverage.
H(1).CData = [0.6000 0.6000 0.6000]; %Run Seed Black
H(2).CData = [0.3333 0.3333 0.3333];% Coverage
H(3).CData = [ 0.7500 0.7500 0.7500]; % DataType
H(4).CData = [0 0 0]; %Mutant Gen
H(5).CData = [0.9000 0.9000 0.9000]; %Run Mutant
H(6).CData = [1 1 1];%white for Diff.test
Also I cant set the facecolor value to hexadecimal values directly. Any help is appreciated?
I have also tried using the hatchfill to create legend but the quality is too low.
runtime_mutation_grayscaled.jpg
  7 件のコメント
Sohil Shrestha
Sohil Shrestha 2019 年 5 月 5 日
This link you sent is an update to the one i have in my earlier comment. It too suffers from the same issue. I wish Mathworks would have this feature support in later release.
Adam Danz
Adam Danz 2019 年 5 月 5 日
I haven't looked at the FEX files but perhaps the approaches in this blog will be helpful.

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

回答 (0 件)

カテゴリ

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