I am making a series of plots from several different scripts. I want to use the 'seaborn-bright' style with some minor changes.
How can I efficiently apply the style and changes to all scripts, before creating the plots, without having to copy/paste the template to every script? Something where I can import the style+changes and automatically apply to every plot generated in the script.
I guess I could create the plots and the apply a function to the fig, ax to clean them up, but I'd rather define things at the start.
I also could save the style sheet for seaborn-bright and edit the definitions, but that seems tedious and it seems like there should be a better way.
Example:
import matplotlib.pyplot as plt
### Template for all plots
### How do I have this as a separate file and just call/execute?
plt.style.use("seaborn-bright")
plt.rcParams["figure.figsize"] = (3,2)
plt.rcParams["figure.dpi"] = 120
plt.rcParams["xtick.direction"] = "in"
# lots of other little things
### Example plot in a stand-alone script
fig, ax = plt.subplots(1, 1)
ax.plot([0, 1], [0, 1])
ax.plot([0.2, 0.8], [0.2, 0.2])
ax.plot([0.2, 0.8], [0.4, 0.4])
