How to plot a line on the histogram?
173 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
yogan sganzerla
le 7 Juin 2017
Réponse apportée : RBEngineer
le 27 Avr 2020
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 commentaires
Réponse acceptée
Image Analyst
le 7 Juin 2017
Modifié(e) : Image Analyst
le 7 Juin 2017
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 commentaires
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Histograms dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!