Fractions inside a legend
Mostrar comentarios más antiguos
Hi , i am trying to write a fraction 1/3 in a legend.
Please see my attemtp and the resulting legend. please help
legend('External Force','Net Force', '$F = \frac{1}{3}$','Interpreter','latex')
6 comentarios
madhan ravi
el 7 de Abr. de 2019
It worked fine for me in 2018 b version , which release are you using?
Vincent Kavanagh
el 7 de Abr. de 2019
Star Strider
el 7 de Abr. de 2019
It worked for me as well (R2019a).
Try this:
hl = legend('External Force','Net Force', '$F = \frac{1}{3}$');
set(hl ,'Interpreter','latex')
Vincent Kavanagh
el 7 de Abr. de 2019
Star Strider
el 7 de Abr. de 2019
My pleasure.
Vincent Kavanagh
el 7 de Abr. de 2019
Respuestas (1)
Star Strider
el 7 de Abr. de 2019
To put a negative sign in front of it, do this:
hl = legend('External Force','Net Force', '$F = -\frac{1}{3}$');
set(hl ,'Interpreter','latex')
If I understand correctly what you want to do.
Categorías
Más información sobre Legend en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!