Skip to content

Latest commit

 

History

History
65 lines (43 loc) · 2.37 KB

README.rst

File metadata and controls

65 lines (43 loc) · 2.37 KB

Documentation Build Status Test coverage


mplstyle

mplstyle is a Python package, which allows matplotlib users to simplify the process of improving plots quality. Quite often font, size, legend, colors and other settings have to be changed to make graphs look better. Such changes can be saved and stored in your own plot style, which can automatically change the way of making plots by importing it as a usual Python toolbox. In other words, with mplstyle you can set plotting settings once and use your own configurations.

Screenshot

docs/img/with_without.png

Dependencies

Installation

  • from GitHub: pip install git+https://github.com/tzipperle/mplstyle.git@master
  • from source: pip . install

Useful settings: Custom directory for own packages

Add the package mplstyle automatically to sys.path:

  1. Create a directory anywhere, e.g. C:\Users\Name\Documents\Python\Libs.
  2. Add the file sitecustomize.py to the site-packages folder of the Python installation, i.e. in C:\Anaconda3\Lib\site-packages (for all users) or site.USER_SITE (for a single user).
  3. This file then is filled with the following code:
import site
site.addsitedir(r'C:\Users\Name\Any\Folder\You\Like\Libs')
  1. The directory now is automatically added to sys.path in every (I)Python session.

Package site, that is automatically imported during every start of Python, also tries to import the package sitecustomize for custom package path modifications.

Source: Stack Overflow