Write between $$
to force matplotlib to interpret it.
import matplotlib.pyplot as plt
plt.plot(range(10), range(10), label = "Normal text $\it{Italics}$")
plt.legend()
plt.show()
More Related Contents:
- How to put the legend outside the plot in Matplotlib
- Matplotlib scatter plot with different text at each data point
- Moving matplotlib legend outside of the axis makes it cutoff by the figure box
- How to manually create a legend
- How to put the legend outside the plot
- How to edit a seaborn legend title and labels for figure-level functions
- Matplotlib scatter plot with legend
- Stop matplotlib repeating labels in legend
- How to change legend size with matplotlib.pyplot
- matplotlib: colorbars and its text labels
- How to increase/reduce the fontsize of x and y tick labels
- Box around text in matplotlib
- Subheadings for categories within matplotlib custom legend
- How to change the text color of font in legend?
- How to change legend fontsize with matplotlib.pyplot
- How to add a string as the artist in matplotlib legend?
- Add legend to scatter plot (PCA)
- How is order of items in matplotlib legend determined?
- Change main plot legend label text
- using mpatches.Patch for a custom legend
- matplotlib: 2 different legends on same graph
- Remove line through marker in matplotlib legend
- Custom arrow style for matplotlib, pyplot.annotate
- Matplotlib savefig with a legend outside the plot
- Combine two Pyplot patches for legend
- Adding a matplotlib legend
- How to plot a scatter plot with a legend label for each class
- automatically position text box in plot
- Is it possible to add a string as a legend item
- Adding legend based on existing color series