Hat on letter on x/ylabel WITHOUT using LaTeX?
Ältere Kommentare anzeigen
Hi all,
I am wondering how I can add a 'hat' above a character on a plot without, however, changing the font to LaTeX, as I was my font style to remain default.
Thanks!
1 Kommentar
dpb
am 23 Apr. 2020
LaTeX is not the font, it's the text interpreter...sure probably know that, but just for clarification/precision of terminology.
Can't be done w/ TeX as an interpreted sequence; TeX only displays a character from the set in the table outlined in the documentation under the 'Interpreter' property at text function entry.
You can try to use text to write two characters
Akzeptierte Antwort
Weitere Antworten (1)
Robert U
am 23 Apr. 2020
Hi Minas Emiris,
convert the circumflex from unicode to string via sprintf (see here, unicode table for combining characters found here) and use append to create the string for the labels (as shown here):
circumFlex = sprintf('\x0302')
fh = figure;
ah = axes(fh);
ah.XLabel.String = append('T',circumFlex);
Kind regards,
Robert
Kategorien
Mehr zu Line Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

