Why text is not centered?

49 views (last 30 days)
Zeynab Mousavikhamene
Zeynab Mousavikhamene on 6 Sep 2019
Answered: Walter Roberson on 6 Sep 2019
text(x,y','FontSize',12,'HorizontalAlignment', 'center') but the inf is not in the center (look at picture)
Capture.JPG
  2 Comments
Rik
Rik on 6 Sep 2019
Try to make a MWE so we can run your code without any other dependencies and can reproduce your issue.
dpb
dpb on 6 Sep 2019
We can't reproduce -- don't have x, y and there's no text argument so the above wouldn't even execute w/o error.
>> axes
>> xlim([0 10]),ylim([0 10])
>> x=5;y=5;
>> text(x,y','FontSize',12,'HorizontalAlignment', 'center')
Error using text
Invalid parameter/value pair arguments
>>

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 6 Sep 2019

Categories

Find more on Environment and Settings 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!