Last active
March 27, 2024 10:28
-
-
Save ArthurDelannoyazerty/b35f366d8168b96cc1a17bad6c0eb0c4 to your computer and use it in GitHub Desktop.
To put in a script. Can save and/or show a plot. Save the plot in a big window.
This file contains 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 | |
SHOW = False | |
SAVE = True | |
def display_save_plt(title:str): | |
if SAVE: | |
plt.gcf().set_size_inches(25, 13) | |
plt.savefig("data/stats/" + title + ".png", dpi=200) | |
if SHOW: | |
plt.gcf().set_size_inches(20, 11) | |
plt.show() | |
if not SHOW:plt.clf() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment