MATLAB Answers

how can I present histogram as line plot

조회 수: 3(최근 30일)
sani 24 May 2020
댓글: Star Strider 24 May 2020
I want to present histogram as the picture added, does anyone knows what is the commend?

  댓글 수: 0

Sign in to comment.

채택된 답변

Star Strider
Star Strider 24 May 2020
Set DisplayStyle to stairs.

  댓글 수: 5

표시 이전 댓글 수: 2
Steven Lord
Steven Lord 24 May 2020
Zoom in. You've got bins of width 0.1 spanning from (roughly) 0 to 3500 on the X axis. That means you have roughly 35000 bins. What's the horizontal resolution of your computer screen?
My guess is that some of those bins contain data and some are empty. You've probably got something that looks like this but with much narrower bins and many more bins.
histogram('BinCounts', repmat([5 0], 1, 10), ...
'BinEdges', 0:20, ...
'DisplayStyle', 'stairs')
ylim([-1 6])
To paraphrase Roy Scheider in the movie Jaws, I think you're gonna need bigger (wider) bins. Or a bigger (higher resolution) screen.
sani 24 May 2020
yes you are right, it was the bin number, thanks!
Star Strider
Star Strider 24 May 2020
As always, my (our) pleasure!
Steven — Thank you!

Sign in to comment.

추가 답변(0개)


Translated by