Latex is commonly used in typesetting grammar, scientific computing software is also used to write mathematical formulas (such as MATLAB, matplotlib, etc.), meteoinfo by calling Jmathlatex Library can also achieve such a function. The syntax of latex can be found on this page: http://matplotlib.org/users/mathtext.html
Here are two examples:
Script Program:
deff (x, C): M1= Sin (2*pi*x) M2= exp (-c*x)returnM1 *m2 x= Linspace (0, 4, 100) Sigma= 0.5plot (x, f (x, sigma),'R', linewidth=2) Xlabel (R'$\rm{time} \ t$', fontsize=16) Ylabel (R'$\rm{amplitude} \ f (x) $', fontsize=16) title (R'$f (x) \ \rm{is \ damping \ with} \ x$', fontsize=16) Text (2.0, 0.5, R'$f (x) = \rm{sin} (2 \pi x^2) E^{\sigma x}$', fontsize=20) Show ()
x = Arange (0.01, 1, 0.01= 0.5*log ((1-x)/x) Scatter (x,y,s=4,label=r'$\alpha =\frac{1}{2 }\ln (\frac{1-\varepsilon}{\varepsilon}) $') xlabel (R'$\varepsilon$' , fontsize=20) ylabel (R'$\alpha$', fontsize=20) xlim (0,1 ) legend () show ()
Meteoinfolab Script Example: Latex writing math formula