文字水印添加文字水印。 12345678910111213141516import numpy as npimport matplotlib.pyplot as plt# Fixing random state for reproducibilitynp.random.seed(19680801)fig, ax = plt.subplots()ax.plot(np.random.rand(20), '-o', ms=20, lw=2, alpha=0.7, mfc='orange')ax.grid()fig.text(0.95, 0.05, 'Property of MPL', fontsize=50, color='gray', ha='right', va='bottom', alpha=0.5)plt.show() 参考此示例中显示了以下函数,方法,类和模块的使用: 12import matplotlibmatplotlib.figure.Figure.text 下载这个示例 下载python源码: watermark_text.py 下载Jupyter notebook: watermark_text.ipynb