molib
This package contains functions that I keep re-using in different packages, so I decided to publish them, in case it helps other too.
Installation
To install molib, use pip (or similar):
pip install molib
Documentation
Figures
Add letter labels to all subplots in a figure.
label_subplots(fig, size=14)
- Adjusts figure padding and left margin to make labels fit.
- Uses
add_subfig_labelandgen_sub_label.
Add a subplot label to an axis.
add_subfig_label(ax, label, size=14)
Generate the next figure label.
gen_sub_label(lower=False, paren=False)
- Produces the next letter in the alphabet as a subfig label.
- Label can be uppercase or lowercase, with optional parentheses.
Save plots in a directory
save_plot(output_filename, proj_dir=Path.cwd(), subdir=None, fig=None)
- Function for saving plots (active plot or given figure) and printing a console message.
- Saves as a 300dpi png file.
- Makes plots directory if it does not exist.
- Directory name is customizable.
Colors
Rescale RGB to values between 0 and 1
rescale_colors(color_list)
Tableau 10 Colors
tableau10(index)
Tableau 20 Colors
tableau20(index)
Tableau Color Blind 10
tableau10blind(index)
Logging
Custom console logger
import logging
console_logger(logging.DEBUG)
Metadata
Release files for molib 0.3.1
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 |
|---|---|---|---|---|
| molib-0.3.1.tar.gz | 4.3 kB | Without provenance | Details for molib-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| molib-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for molib-0.3.1-py3-none-any.whl |
Total release size: 12.4 kB
Release files / molib-0.3.1.tar.gz
| Download URL | molib-0.3.1.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
320d5906c803bb3790e56dcfbed6daf41c82d9df4344041a4bdfa5dea0af993e
|
|
BLAKE2b-256 checksum How to use checksums |
87141bd884d6a958f6ab4862676f87c1bd7e67622a30de3da4b9c716205dc982
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.11 CPython/3.7.2 Windows/10
|
Release files / molib-0.3.1-py3-none-any.whl
| Download URL | molib-0.3.1-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c393d029dbe484e67ba6fc3eda9ef6035cbc5dd32d908870b6e23104f1d838c1
|
|
BLAKE2b-256 checksum How to use checksums |
80befc4aed4e69ad253b33d3e3eddf0a1d1fa246108ec3789a5a6624f6794c77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.11 CPython/3.7.2 Windows/10
|
Security for molib 0.3.1
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.