个人记录向
from matplotlib import pyplot as plt
import matplotlib as mpl
import numpy as np
mpl.rcParams['font.sans-serif'] = ["SimHei"]
mpl.rcParams["axes.unicode_minus"] = False
style = dict(size=10, color='r')
x = [140, 150, 160, 170, 180, 190, 200, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220]
y = [1, 0.993, 1, 0.996, 1, 0.983, 0.98, 0.863, 0.876, 0.86, 0.883, 0.753, 0.843, 0.71, 0.613, 0.443, 0.263, 0]
plt.plot(x, y, c="#418CBF", marker='^')
plt.plot([217] * 100, np.linspace(0, 1, 100), "r--")
plt.text(217, 0.613, "篡改217个水印时,提取准确率仍然在60%以上", ha='right', **style)
plt.xlabel('篡改水印数')
plt.ylabel('准确率')
plt.show()
效果图: