I am currently using a variant of this answer to eliminate the top/right edges on my plots. However, I would like to be able to add this to my .mplstyle file instead of calling this function for every plot I create. Is there a way to achieve this functionality using the style parameters, or even by calling something once at the beginning of my code?
Asked
Active
Viewed 466 times
2 Answers
2
You can use:
axes.spines.top : False
axes.spines.right : False
in a mpstyle file to turn off spines. Unfortunately, this recent answer indicates that ticks cannot currently be controlled from an rc or style file like this, and I haven't yet found a way either. However, in matplotlib 2.0 you should be able to write:
xtick.top : False
ytick.right : False
(In fact, this appears to be the default style for 2.0, according to the template file.)

Community
- 1
- 1

user812786
- 4,302
- 5
- 38
- 50
-
Brilliant, thanks. I guess that will do in the meantime. Mostly unrelated, but is there a date for the 2.0 release? I can only find info about when various betas are out. – Julia Ebert Oct 05 '16 at 21:38
-
Glad to help! No idea, I've been watching the developer mailing list and haven't seen anything about a specific date yet either. – user812786 Oct 05 '16 at 21:44