Skip to content

Commit

Permalink
fix(thesis/notes.md&utils): matplotlib configuration for figure font …
Browse files Browse the repository at this point in the history
…size

Add legend font size setting./nMove result figure to utils directory.
  • Loading branch information
hilinxinhui committed Jun 15, 2023
1 parent 8586753 commit 5027fc0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions thesis/note.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
```
Binary file renamed font_size_test.jpg → utils/font_size_test.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions utils/mpl_font_size.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit 5027fc0

Please sign in to comment.