Created
March 10, 2024 15:19
-
-
Save HViktorTsoi/37bd93dc991a7025902f51e88f37c345 to your computer and use it in GitHub Desktop.
Matplotlib, set decimal format of axis
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import matplotlib.ticker as mtick | |
plt.gca().yaxis.set_major_formatter(mtick.FormatStrFormatter('%.2f')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment