import numpy as np
import matplotlib.pyplot as plt
x=np.linspace(0,100,100)
y=np.sin(x)+1/np.sin(x)
plt.xlim(0,150)
plt.plot(x,y,label=r'The following will be in latex format: $\sin \alpha + \frac{1}{\sin \alpha} (\mathbf{latex})$ ')
plt.legend()
单行的latex部分就是r''中$$包含的部分