Adjust the vertical and horizontal alignment of the label of xline function

95 views (last 30 days)
alpedhuez on 7 Aug 2021
Commented: alpedhuez on 9 Aug 2021
xline function is nice.
There is an example of "Adjust the vertical and horizontal alignment of the label" at
Following an example in the online document, I have created an example. Although I can draw the plot, the label is not aligned in the middle as it should be.
I have attached a screenshot. What is wrong?

Accepted Answer

Dave B
Dave B on 7 Aug 2021
Edited: Dave B on 7 Aug 2021
This would be much easier to diagnose if you put your code in the question instead of a picture, but I belive you used a number 1 for defining x1, and a letter L for setting the property.
make sure you use the same variable name and it should work!
(suspicion confirmed by zooming in):

Sign in to comment.

More Answers (0)





Community Treasure Hunt

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

Start Hunting!

Translated by