Figure axes not appearing when using tex syntax
Afficher commentaires plus anciens
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 commentaires
File a bug report: https://www.mathworks.com/support/contact_us.html
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')
?
Réponses (0)
Catégories
En savoir plus sur Creating, Deleting, and Querying Graphics Objects dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


