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 . --user
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.
More advanced usage
You can use the function smplotlib.set_style(fontweight='normal', usetex=False, fontsize=15, figsize=(6, 6), dpi=120) to customize the global seetings including font weight, font size, default figure size and resolution, and whether using LaTeX for math. The default font weight is 'normal', and the default setting for LaTeX is False. You can specify font weight as 'light' or 'heavy'. Current support for LaTeX is not quite satisfying, so it is recommended to set usetex=False.
You can turn off the black edgecolor of scatter plots by smplotlib.set_style(edgecolor='face'). This is useful when you want to plot a large number of points.
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.
Citation
If you find this package entertaining or useful, please consider citing it following the instructions in .
Metadata
Release files for smplotlib 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| smplotlib-1.0.0.tar.gz | 437.9 kB | Without provenance | Details for smplotlib-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| smplotlib-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for smplotlib-1.0.0-py3-none-any.whl |
Total release size: 869.3 kB
Release files / smplotlib-1.0.0.tar.gz
| Download URL | smplotlib-1.0.0.tar.gz |
|---|---|
| Size | 437.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30dcdaf746e978d5f306c78a711b8b14f86e833e35b82f5a9bb11c9c0469d1c8
|
|
BLAKE2b-256 checksum How to use checksums |
3a3f93825537c5bcb5d31339fd714c6ee646866a0c4889c577a8f0eaec132377
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / smplotlib-1.0.0-py3-none-any.whl
| Download URL | smplotlib-1.0.0-py3-none-any.whl |
|---|---|
| Size | 431.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9e41f1a8d03421f6526f4eebf271a8cfe8bf638bb0e946d1dcb9b28f3975c954
|
|
BLAKE2b-256 checksum How to use checksums |
a50408993e3375316bd4a7d79b5de1c1379c40101fcd4f742148f9c16f5f1f16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for smplotlib 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.