Latex Title in figure
Afficher commentaires plus anciens
Hi, I have a very long Latex equation where I've broken it up to 5 lines:
Tstr{1} = '$ \mathrm{a0}+\mathrm{a1}\, \left(x - \mathrm{x0}\right)+\mathrm{a2}\, \left(y - \mathrm{y0}\right)+\mathrm{a3}\, \left(z - \mathrm{z0}\right)+$';
Tstr{2}= '$\mathrm{a4}\, {\left(x - \mathrm{x0}\right)}^2+\mathrm{a5}\, \left(x - \mathrm{x0}\right)\, \left(y - \mathrm{y0}\right)+\mathrm{a6}\, {\left(y - \mathrm{y0}\right)}^2+\mathrm{a7}\, \left(x - \mathrm{x0}\right)\, \left(z - \mathrm{z0}\right)+$'
Tstr{3} = '$\mathrm{a8}\, \left(y - \mathrm{y0}\right)\, \left(z - \mathrm{z0}\right)+\mathrm{a9}\, {\left(z - \mathrm{z0}\right)}^2+\mathrm{a10}\, {\left(x - \mathrm{x0}\right)}^3+\mathrm{a11}\, {\left(x - \mathrm{x0}\right)}^2\, \left(y - \mathrm{y0}\right)+$'
Tstr{4} = '$\mathrm{a12}\, \left(x - \mathrm{x0}\right)\, {\left(y - \mathrm{y0}\right)}^2+\mathrm{a13}\, {\left(y - \mathrm{y0}\right)}^3+\mathrm{a14}\, {\left(x - \mathrm{x0}\right)}^2\, \left(z - \mathrm{z0}\right)+\mathrm{a15}\, \left(x - \mathrm{x0}\right)\, \left(y - \mathrm{y0}\right)\, \left(z - \mathrm{z0}\right)+$'
Tstr{5} = '$\mathrm{a16}\, {\left(y - \mathrm{y0}\right)}^2\, \left(z - \mathrm{z0}\right)+\mathrm{a17}\, \left(x - \mathrm{x0}\right)\, {\left(z - \mathrm{z0}\right)}^2+\mathrm{a18}\, \left(y - \mathrm{y0}\right)\, {\left(z - \mathrm{z0}\right)}^2+\mathrm{a19}\, {\left(z - \mathrm{z0}\right)}^3$'
figure
h = title(Tstr,'interpreter','latex','fontsize',10);
Setting the title to Tstr give me an error: Warning: Unable to interpret LaTeX string.
However, setting the title to each cell of Tstr doesn't give me an error, nor if I limit the title to only 4 lines : Tstr(1:4) or Tstr(2:5).
Is there another way to get around this? I've tried using a simple title to see if there was a limit on lines allowed in the title but the below worked just fine:
title({'1';'2';'3';'4';'5'},'fontsize',10);
Please help! Thanks, Patricia
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Labels and Annotations 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!