Creating a style template for easy re-use of matplotlib settings

Although the default appearance of plots made using matplotlib can appear somewhat drab, I really enjoy the customizability that allows you to tweak every single tiny element of your plot.

If you find yourself consistently changing some of the basic settings inmatplotlib every time you create a new figure, it may be fruitful to generate a style file. By importing this style, you can ensure consistency, while still maintaining the ability to override settings as you wish within the individual scripts. This is great if you are, for example, generating figures for a publication and want them all to look the same without having to copy/paste settings each time.

You can find a template for a style file at the matplotlib Github respository. As you see, there are an almost endless number of settings that you can customize as you wish! We will use this as a guide to create our own style file.

#data-science #python #matplotlib #machine-learning

A Guide to Creating and Using Your Own Matplotlib Style
2.10 GEEK