1

I am trying to plot a histogram using MATHEMATICA from a 2 column data in which the 1st has the numbers increasing from the minimum to maximum having the same interval and the 2nd has the frequency. I calculated the interval as, interval = (max-min)/(number of Bins). The default Histogram[] works fine for a single column data without frequency calculated but now my data has frequency. Would you please help me on this?

Thank you very much;

4

1 に答える 1

1

説明した形式でサンプルデータを生成すると、次のようにプロットできます。

frequencydata = Tally@Sort[RandomInteger[9, 100]];
TableForm[frequencydata, TableHeadings -> {None, {"Value", "Frequency"}}]

ここに画像の説明を入力

Histogram[Flatten[Table[#1, {#2}] & @@@ frequencydata], {0, 10, 1}]

ここに画像の説明を入力

于 2013-02-28T14:35:32.373 に答える