Latex en la leyenda de los graficos
9 views (last 30 days)
Show older comments
¿Por que la leyenda del grafico no me toma la fuente de latex?
x=[0:0.02:1];
u1=0.13-1.37.*x+1.9.*x.^2-1.11.*x.^3-0.88.*x.^4;
u2=0.13-1.46.*x+0.09.*x.*(1-x)+1.99.*x.^2.*(1-x)+0.88.*x.^3.*(1-x);
plot(x,u1);
hold on;
grid on;
plot(x,u2,'k--');
legend('u','\hat{u}','interpreter','latex');
xlabel('$x$','interpreter','latex')
ylabel('$u \hspace{3mm} \hat{u}$','interpreter','latex')
0 Comments
Answers (2)
VBBV
on 10 May 2023
Edited: VBBV
on 10 May 2023
you can use the $\hat{u}$ in legend function , The latex interpreter fonts usually appear smaller compared to regular fontsize.
x=[0:0.02:1];
u1=0.13-1.37.*x+1.9.*x.^2-1.11.*x.^3-0.88.*x.^4;
u2=0.13-1.46.*x+0.09.*x.*(1-x)+1.99.*x.^2.*(1-x)+0.88.*x.^3.*(1-x);
plot(x,u1);
hold on;
grid on;
plot(x,u2,'k--');
%
legend('u','$\hat{u}$','interpreter','latex','fontsize',18)
xlabel('$x$','interpreter','latex','fontsize',18)
ylabel('[$u ,\hspace{3mm} \hat{u}$]','interpreter','latex','fontsize',18)
0 Comments
See Also
Categories
Find more on Legend 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!