I can't plot two lists as histograms as different colors on the same plot. Hist wants 'Numeric Input'
1 回表示 (過去 30 日間)
古いコメントを表示
Using R2017a. Trying to graph two lists (numeric arrays) on the same histogram in different colors. I've written:
idx1 = GSSum > manual_threshold
list1 = GSSum(idx1)
idx2 = GSSum < manual_threshold
list2 = GSSum(idx2)
H1 = hist(list1, 'Facecolor', [0.7 0 0.7])
hold on
H2 = hist(list2, 'Facecolor', [ 0 0.9 0])
Error given is: Error using hist (line 48) Input arguments must be numeric.
0 件のコメント
回答 (1 件)
Duncan Po
2017 年 11 月 21 日
What does class(list1) return? If it returns anything other than a builtin numeric class, that would be the reason for your error.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Histograms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!