How does one put an accent on a symbol in plots?
46 views (last 30 days)
Show older comments
Hi,
I'd like to insert symbols like 'hat', 'dot', 'bar', 'arrow', etc over text symbols in plots. Could someone let me know how this is done in Matlab 2014b in the figure window?
Thanks.
0 Comments
Accepted Answer
Star Strider
on 5 Mar 2015
You have to set the 'Interpreter','latex' option, and use the appropriate LaTeX syntax. For details on using LaTeX, see The (Not So) Short Introduction to LaTeX2e. See the full LaTeX Documentation for details on other guides.
4 Comments
Star Strider
on 6 Mar 2015
Edited: Star Strider
on 6 Mar 2015
My pleasure.
It’s not possible to put the dot (or hat or anything else) over the variables in TeX. That’s the reason it’s necessary to use LaTeX.
The title, xlabel, and ylabel would work the same way as the legend in my example. They’re all controlled by Text Properties.
The LaTeX syntax requires a bit of experimentation to learn how it works and how to use it effectively, just like MATLAB itself or any other language. (I have to refer to the documentation I linked to earlier every time I use LaTeX because I don’t use it that often.)
EDIT — In The (Not So) Short Introduction to LaTeX2e, see Section 3.10, page 75, and Table 2.2 on page 25.
More Answers (0)
See Also
Categories
Find more on LaTeX 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!