フィルターのクリア

multiple vectors histogram plotting

1 回表示 (過去 30 日間)
Viviana Arrigoni
Viviana Arrigoni 2017 年 10 月 11 日
回答済み: jean claude 2017 年 10 月 11 日

I would like to plot a histogram like the one in the picture, the x axis is labeled with different matrix names, and for each there is a bar showing the results of three solvers (each having a different colour). For some type of matrices (as matrix k in the picture), there could be no data for a certain solver. The y axis is set as log-scale. Following this stackoverflow, I wrote the following code, that is disastrous:

    x = [x1', x2', x3'];
    [y, b] = hist(x);
    hist(x);
    set(gca, 'YScale', 'log')

where x1, x2, x3 are the arrays of the results for each solver, where the missing data is set as 0.

回答 (1 件)

jean claude
jean claude 2017 年 10 月 11 日
look at this example; it plots this matrix 24x3
load count.dat
hist(count)
legend('Intersection 1',...
'Intersection 2',...
'Intersection 3')

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by