필터 지우기
필터 지우기

Plot histogram values and ranges

조회 수: 10 (최근 30일)
Santos García Rosado
Santos García Rosado 2021년 3월 15일
댓글: Star Strider 2021년 3월 16일
Hello Mathwork's community.
I'm trying to plot an histogram of a vector and I'm getting the following figure:
It's been coded so that there are 30 bins. The thing is that I would like the first been to only represent the 0 values and afterwards keep representing those bin edges, but as you can see on the picture, the first bin goes from 0 to 10.4. I've been doing some research but still can't figure it out.
I'd really appreciate if someone could give me a hand.
Thank you,
Santos

답변 (1개)

Star Strider
Star Strider 2021년 3월 15일
The histogram function allows you to specify whatever bin edges you want. See Specify Bin Edges of Histogram for details.
  댓글 수: 4
Santos García Rosado
Santos García Rosado 2021년 3월 16일
I finally ended up finding a solution. I used de yyaxis left and yyaxis right to do the trick. Thank's anyway
Star Strider
Star Strider 2021년 3월 16일
That is not a solution I would suggest for a histogram plot.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by