/ggsmplot

Port Python Matplotlib template for SuperMongo style to ggplot2 in R

Primary LanguagePythonMIT LicenseMIT

smplotlib

Matplotlib template for SuperMongo (SM) style. Make your plots stylish and professional (and old-school) by one line of code.

Installation

pip install smplotlib

or

git clone
cd smplotlib
pip install -e .

Usage

import smplotlib

Then just use matplotlib.pyplot as usual. For a quick start, you can use smplotlib.demo_plot() to generate a figure with the default settings. This figure is inspired by the two-phase ISM figure in Prof. Bruce Draine's book, but the cooling curve doesn't correspond to the actual CR rates and ISRF.

example

Hershey font

SuperMongo uses Hershey fonts. The ttf files are from a compilation by astronomer yangcht. Thanks for the great work!

There have been many efforts on translating the original Hershey font to modern formats, also see this and this. The font files in this repo still lack some characters, and the support for LaTeX and light weight fonts are not satisfying. If you have any suggestions, please feel free to open an issue or pull request.