フィルターのクリア

How to draw special figures like this:

1 回表示 (過去 30 日間)
Pramit Biswas
Pramit Biswas 2016 年 8 月 16 日
編集済み: Thorsten 2016 年 8 月 16 日
Suppose i have 3(N) boolean array: P1, P2, P3 with total 16 index in each array.
If it is 0 then gray or white will be shown, else some colour will be chosen.

採用された回答

Thorsten
Thorsten 2016 年 8 月 16 日
編集済み: Thorsten 2016 年 8 月 16 日
val = [1 1 2 3 2 1 3 1 2 2 3 2 2 2 4 4];
col = [1 1 0; 1 0 0; 0 1 0; 0.5 0.5 0.5];
axes
hold on
for i = 1:numel(val)
bar(i, 1, 1, 'FaceColor', col(val(i), :));
end
set(gca, 'PlotBoxAspectRatio', [16 4 1])
axis off
axis tight
Use a different subplot for each pattern.

その他の回答 (0 件)

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by