[Scilab-users] Sprintf and Italic font.
Jean-Yves Baudais
Jean-Yves.Baudais at insa-rennes.fr
Mon Mar 25 12:50:36 CET 2019
Hi,
Le 18/03/2019 à 01:56, Marcus Vinicius Pereira de Souza a écrit :
> Kindly, I am generating a graphic and would like some information in the
> title to be in italics. Can someone help me? By way of illustration, see
> the script below > [...]
> a.x_label.text = "$t(s)$"
> a.y_label.text = "$y(t)$"
With $ you write LaTeX expression.
> title(sprintf('y(t) = -%0.2f exp(-0.5t)\ + %0.2f cos(4t)\ + %0.2f
> sin(4t) ',kp1,kp1,kp2))
Then, use $ in sprintf
title(sprintf('$y(t) = -%0.2f exp(-0.5t)\ + %0.2f cos(4t)\ + %0.2f
sin(4t)$',kp1,kp1,kp2))
Br,
Jean-Yves Baudais
More information about the users
mailing list