I want to create a custom style for matplotlib. I saved this file in a local folder libstyle/my_style.mplstyle
. The current content of the file is:
### AXES
axes.grid: True
axes.autolimit_mode: round_numbers
### FONT
font.family: sans-serif
font.sans-serif: Arial
where I setup font, grid and axes limits. I plan to use this style with the call:
plt.style.use(r'libstyle/my_style.mplstyle')
I would like to set a default color for each of the four spines like in the image:
Following this answer, I already know I can add to any python script these lines:
ax.spines['top'].set_color('red')
ax.spines['right'].set_color('blue')
ax.spines['bottom'].set_color('green')
ax.spines['left'].set_color('orange')
But I would like to move all aesthetic configuration from python scripts to my_style.mplstyle
file.
The point is that I don't know which parameter in my_style.mplstyle
I have to edit in order to specify the color of a single spine. I followed this documentation, but didn't find anything about spines color.
Is there a way to set up spines color (one color for each of the four spines) in a .mplstyle
?
Thanks in advance.