How to add a horizontal line in a bar plot????
Show older comments
Dear all,
i use the command bar for a plot. I want to insert a horizontal line in a bar plot at y = 30. How can I do that? Thank you!
Accepted Answer
More Answers (1)
Vivian Hauss
on 19 Jul 2016
Edited: Vivian Hauss
on 19 Jul 2016
A bit shorter:
hline(30,':k','This Line is horizontal')
1 Comment
Pablo Sánchez
on 8 Dec 2020
Edited: Pablo Sánchez
on 8 Dec 2020
Does hline() exist? Is yline()
Categories
Find more on Line Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!