How do you mark points on a histogram?

조회 수: 16 (최근 30일)
Cameron
Cameron 2016년 10월 17일
댓글: Cameron 2016년 10월 17일
Is there a way to mark a specific value on a plot generated with "histogram(...)"? I find a few specific values in my code and would like to highlight or mark them on a histogram. Is there a way to do this?

채택된 답변

Image Analyst
Image Analyst 2016년 10월 17일
You could draw a line through the bar,
line([binValue, binValue], [0, countsValue], 'Color', 'r', 'LineWidth', 2);
Or you could place a mark on top of it
plot(binValue, countsValue, 'r*', 'LineWidth', 2, 'MarkerSize', 15);
or other things. What would you like to do with it?
  댓글 수: 1
Cameron
Cameron 2016년 10월 17일
Thank you! The mark is exactly what I needed. I had tried to create a second plot on top of the histogram as on my first try and was having issues. This worked perfectly.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Histograms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by