matplotlib19:文字

import matplotlib.pyplot as plt
import numpy as np

x = np.arange(-10,11,1)
y = x * x
plt.plot(x,y)
plt.text(0,40,'fanctio:y=x*x')
plt.text(0,20,'fanctio:y=x*x')

plt.show()


# # Autogenerated by boilerplate.py.  Do not edit as changes will be lost.
# @docstring.copy_dedent(Axes.text)
# def text(x, y, s, fontdict=None, withdash=False, **kwargs):
#     ret = gca().text(x, y, s, fontdict=fontdict, withdash=withdash, **kwargs)
#     return ret

  

原文地址:https://www.cnblogs.com/heluobing/p/11173302.html