In this recipe, we will learn how to embed mathematical expressions in a text using a font dictionary to apply the same attributes to all the text on the plot, including the title, labels, and text expressions.
Using mathematical expressions with a font dictionary
Getting ready
Import the required libraries:
import numpy as np
import matplotlib.pyplot as plt
How to do it...
The following code block plots a decaying exponential function. First, we define the font dictionary with all the required attributes, and then we apply the same to every text element on the graph, including...