import matplotlib.pyplot as pltimport numpy as npFor default style, you can modify it by creating mpl_configdir/stylelib, where mpl_configdir can be obtained by
import matplotlib as mplmpl.get_configdir()Then, you can create a style file with the extension name of .mplstyle (mod_default.mplstyle here). Here is an example
font.family : Arialaxes.titlesize : 16axes.labelsize : 16lines.linewidth : 1lines.markersize : 10xtick.labelsize : 16ytick.labelsize : 16axes.grid : Truextick.minor.visible : Trueytick.minor.visible : Truelegend.fontsize : 14After creating the style file, you need to reload the library and check
plt.style.reload_library()print(plt.style.available)Here is some references for existing styles ( https://matplotlib.org/gallery/style_sheets/style_sheets_reference.html )
Since this style file is not a complete one but just to modify some parameters, you still need the default one and replace some parameters using this style file.
plt.style.use(['default','mod_default'])