import matplotlib.pyplot as plt
ax = plt.gca() # or any other way to get an axis object
x = [0,1,2,3,4,5,6]
y = [0,1,4,9,16,25,36]
ax.plot(x, y, label=r'$\sin (x)$')
ax.legend()
top of page
To see this working, head to your live site.
Write a Latex formula in the legend of a plot using Matplotlib
Write a Latex formula in the legend of a plot using Matplotlib
0 comments
Like
Comments
bottom of page