1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
import numpy as np import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif'] = ['Arial'] plt.rcParams['axes.unicode_minus'] = False
x = np.array([1, 2, 3, 4, 5, 6]) VGG_supervised = np.array([2.9749694, 3.9357018, 4.7440844, 6.482254, 8.720203, 13.687582]) VGG_unsupervised = np.array([2.1044724, 2.9757383, 3.7754183, 5.686206, 8.367847, 14.144531]) ourNetwork = np.array([2.0205495, 2.6509762, 3.1876223, 4.380781, 6.004548, 9.9298])
plt.figure(figsize=(10, 5),dpi=600) plt.grid(linestyle="--") ax = plt.gca() ax.spines['top'].set_visible(False) ax.spines['right'].set_visible(False)
plt.plot(x, VGG_supervised, marker='o', color="blue", label="VGG-style Supervised Network", linewidth=1.5) plt.plot(x, VGG_unsupervised, marker='o', color="green", label="VGG-style Unsupervised Network", linewidth=1.5) plt.plot(x, ourNetwork, marker='o', color="red", label="ShuffleNet-style Network", linewidth=1.5)
group_labels = ['Top 0-5%', 'Top 5-10%', 'Top 10-20%', 'Top 20-50%', 'Top 50-70%', ' Top 70-100%'] plt.xticks(x, group_labels, fontsize=12, fontweight='bold') plt.yticks(fontsize=12, fontweight='bold')
plt.xlabel("Performance Percentile", fontsize=13, fontweight='bold') plt.ylabel("4pt-Homography RMSE", fontsize=13, fontweight='bold') plt.xlim(0.9, 6.1) plt.ylim(1.5, 16)
plt.legend(loc=0, numpoints=1) leg = plt.gca().get_legend() ltext = leg.get_texts() plt.setp(ltext, fontsize=12, fontweight='bold')
plt.savefig('./filename.svg', format='svg') plt.show()
|