Last active
August 4, 2019 06:30
-
-
Save binste/92ff07e62fd4b67252243ed218fa3dd1 to your computer and use it in GitHub Desktop.
Better plot defaults for matplotlib
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 | |
font_size = 18 | |
plt.style.use("seaborn-whitegrid") | |
plt.rc("axes.spines", top=False, right=False, bottom=False, left=False) | |
plt.rcParams["figure.figsize"] = (10, 6) | |
plt.rcParams["font.size"] = font_size | |
plt.rcParams["axes.labelsize"] = font_size | |
plt.rcParams["xtick.labelsize"] = font_size | |
plt.rcParams["ytick.labelsize"] = font_size | |
plt.rcParams["legend.fontsize"] = font_size | |
plt.rcParams["figure.titlesize"] = font_size |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment