Skip to content
This repository has been archived by the owner on May 20, 2021. It is now read-only.

Where to start for Mathematica-standard publication-quality plots in python

License

Notifications You must be signed in to change notification settings

mathematica-mpr/mplstyle-mathematica

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Matplotlib Style for Mathematica

Where to start for Mathematica-standard publication-quality plots in python.

(TODO: add example plots)

Mathematica has an ever-evolving brand guide for publications, presentations, and client-deliverable products. The mprstyle package applies a simple stylesheet to matplotlib and seaborn plots to match, as closely as possible, the specifications in the Mathematica brand guide. It also provides helper functions for formatting axis tick labels, color maps that match the Mathematica brand color scheme, 508-compliant categorical color scales, and so on.

Installation

Install this package directly from github using pipenv:

$ pipenv install -e "git+https://github.com/mathematica-mpr/mplstyle-mathematica@v0.0.1#egg=mplstyle-mathematica"

Usage

Apply the style to matplotlib and seaborn plots by importing the mprstyle module and calling apply():

import mprstyle
import matplotlib.pyplot as plt

mprstyle.apply("default")  # or "508"

f, a = plt.subplots()
x = list(range(0, 6, 0.01))
y1 = [sin(_) for _ in x]
y2 = [cos(_) for _ in x]
a.plot(x, y1, x, y2)
f.show()

(TODO: add example plots)

TODO

  • Add with style functionality.
  • Document fonts.
  • Document helper functions.

About

Where to start for Mathematica-standard publication-quality plots in python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages