Figure axes not appearing when using tex syntax

Hello all, I recently got a new macbook and it seems that in the figure window I'm not able to display tex labels. For example, when I run this code:
x=1:100;
y=x/10^20;
plot(x,y);
xlabel('x_i');
ylabel('\theta');
This is the plot I would expect to get. However, what I actually get is
As you can see, no text formatting like I requested. I haven't had this issue on any other OS, so I'm wondering if this is Mac specific?
Note that other labels display perfectly. For example,
xlabel('x')
ylabel('y')
Displays without issues

2 Comments

x = 1:100;
y = x./10.^20;
plot(x,y)
xlabel('x_i')
ylabel('\theta')
Out of curiosity, what happens if you write
tiledlayout(2,2)
nexttile
xlabel('x_1','interpreter','tex')
ylabel('\theta','interpreter','tex')
text(0.5,0.5,'\theta x_1','interpreter','tex')
nexttile
xlabel('$x_{1}$','interpreter','latex')
ylabel('$\theta$','interpreter','latex')
text(0.5,0.5,['$\theta$ ' ' $x_{1}$'],'interpreter','latex')
?

Sign in to comment.

Answers (0)

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Products

Release

R2025a

Asked:

on 7 Oct 2025

Edited:

dpb
on 7 Oct 2025

Community Treasure Hunt

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

Start Hunting!