histfit (adding values to histogram bins)

Hello Everyone,
I am trying to show both PDF nad Histogram in one plot. Therefore, I am using histfit.
But what I need to do, is to show the values inside each bin on the plot (above each bin).
Is it possible?
Thanks.

回答 (1 件)

Ashish Mishra
Ashish Mishra 2020 年 12 月 9 日

0 投票

You can position any text or values inside or on top of bins using text function.
Firstly read the values of the bins in some variables and use num2str to convert it into string and use text to postion it.

カテゴリ

ヘルプ センター および File ExchangeMathematics についてさらに検索

タグ

質問済み:

2020 年 12 月 3 日

回答済み:

2020 年 12 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by