Text and latex interpreter in xlabel

  • LaTeX
  • Thread starter member 428835
  • Start date
  • Tags
    Latex Text
  • #1

member 428835

Hi PF!

I'm going insane here. How can I have the following in xlabel: ##Q \text{ (mm\sup 3/s)}##?
 
Physics news on Phys.org
  • #2
Answer is here:
Code:
xlabel(['$Q$', ' (mm \textsuperscript{3}/s)'],'Interpreter','latex')
 
  • #3
Nice, thanks for sharing.

Smetimes these kinds of display issues with text drive one insane. I once had to render some funky labels in Java and discovered that display text could in fact be a string of html tags to resize, colorize, fontify (a made up word to mean change the font to a more desireable one) the text. It really made my day too.
 
  • Like
Likes member 428835
  • #4
joshmccraney said:
Answer is here:
Or,
Till R2020b:
xlabel('$Q~\left( \mathrm{mm}^3/\mathrm{s} \right)$', 'Interpreter', 'latex')
Or, using the new Name=Value syntax introduced in R2021a,
R2021a and later:
xlabel('$Q~\left( \mathrm{mm}^3/\mathrm{s} \right)$', Interpreter='latex')
 
  • Like
Likes member 428835 and jedishrfu

Suggested for: Text and latex interpreter in xlabel

Replies
2
Views
641
Replies
1
Views
421
Replies
1
Views
785
Replies
2
Views
540
Replies
8
Views
1K
Replies
2
Views
1K
Replies
3
Views
795
Replies
1
Views
1K
Replies
7
Views
965
Back
Top