diff --git a/thesis/note.md b/thesis/note.md index bb69e26..bb7dd97 100644 --- a/thesis/note.md +++ b/thesis/note.md @@ -157,4 +157,7 @@ if __name__ == "__main__": plt.xlabel("index", font) save_path = "./font_size_test.jpg" plt.savefig(save_path, dpi=1000, bbox_inches="tight") + + # 设置legend字号 + plt.legend(["示例图线"], fontsize=font["size"]) ``` \ No newline at end of file diff --git a/font_size_test.jpg b/utils/font_size_test.jpg similarity index 53% rename from font_size_test.jpg rename to utils/font_size_test.jpg index 7bb212a..3f4f849 100644 Binary files a/font_size_test.jpg and b/utils/font_size_test.jpg differ diff --git a/utils/mpl_font_size.py b/utils/mpl_font_size.py index 1d92ff1..6a7852f 100644 --- a/utils/mpl_font_size.py +++ b/utils/mpl_font_size.py @@ -13,5 +13,6 @@ plt.plot(data) plt.ylabel("data", font) plt.xlabel("index", font) + # plt.legend(["正弦曲线"], fontsize=28) save_path = "./font_size_test.jpg" plt.savefig(save_path, dpi=1000, bbox_inches="tight") \ No newline at end of file