Math expressions with matplotlib 1

Math expressions with matplotlib

# math text
plt.title(r'$\alpha > \beta$')

Here is what the above code is Doing:
1. plt.figure() creates a new figure.
2. plt.plot() plots y versus x as lines and/or markers.
3. plt.xlabel() adds text label to the x-axis.
4. plt.ylabel() adds text label to the y-axis.
5. plt.title() adds title to the plot.
6. plt.show() displays the plot.

Similar Posts