How to plot a line on the histogram?
95 ビュー (過去 30 日間)
古いコメントを表示
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/164956/image.jpeg)
Hello,
My name is Yogan and I am studying Monte Carlos Method. I plotted the graphic using "Hist(Name_Variable)"
I am adding above the gráphic that I am talking.
Well, My question is: I need to draw a vertical line in a specific point . I found a lot of answers about draw lines using the Plot, but it dosen't happend with Hist.
Thanks
0 件のコメント
採用された回答
Image Analyst
2017 年 6 月 7 日
編集済み: Image Analyst
2017 年 6 月 7 日
Use line
hold on;
line([x, x], ylim, 'LineWidth', 2, 'Color', 'r');
where x is the value you want the vertical line drawn at, for example 700:
line([700, 700], ylim, 'LineWidth', 2, 'Color', 'r');
0 件のコメント
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Histograms についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!