Manny's code snippets
Project description
# molib
This package contains functions that I keep re-using in different packages, so I decided to publish it in case it helps other too.
# Installation
To install molib, use pip (or similar):
```{.sourceCode .bash}
pip install molib
```
# Documentation
```python
label_subplots(fig, size=14)
```
Adds letter labels to all subplots in a figure.
Adjusts figure padding and left margin to make labels fit.
```python
add_subfig_label(ax, label, size=14)
```
Adds a subplot label to an axis.
```python
gen_sub_label(lower=False, paren=False)
```
Generates the next letter in the alphabet as a subfig label.
Label can be uppercase or lowercase, with optional parentheses.
```python
save_plot(output_filename, proj_dir=Path.cwd(), subdir=None, fig=None)
```
Function for saving plots and printing message; makes plots directory.
This package contains functions that I keep re-using in different packages, so I decided to publish it in case it helps other too.
# Installation
To install molib, use pip (or similar):
```{.sourceCode .bash}
pip install molib
```
# Documentation
```python
label_subplots(fig, size=14)
```
Adds letter labels to all subplots in a figure.
Adjusts figure padding and left margin to make labels fit.
```python
add_subfig_label(ax, label, size=14)
```
Adds a subplot label to an axis.
```python
gen_sub_label(lower=False, paren=False)
```
Generates the next letter in the alphabet as a subfig label.
Label can be uppercase or lowercase, with optional parentheses.
```python
save_plot(output_filename, proj_dir=Path.cwd(), subdir=None, fig=None)
```
Function for saving plots and printing message; makes plots directory.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
molib-0.1.1.tar.gz
(2.8 kB
view details)
Built Distribution
molib-0.1.1-py3-none-any.whl
(4.6 kB
view details)
File details
Details for the file molib-0.1.1.tar.gz
.
File metadata
- Download URL: molib-0.1.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.10 CPython/3.6.0 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db30f60032046223d6e8fbb9d40ebc62532c2a6c020117002abef79badaf51f9 |
|
MD5 | 2529e6d0107aab00a077097e4c89ad1c |
|
BLAKE2b-256 | 96a024cfc317e1b946db0562766e52976c48a3ecddb57dec4b5a7473029cfcf5 |
File details
Details for the file molib-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: molib-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.10 CPython/3.6.0 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6770d42c059e7ed29437462f2e89b4aeb384ece7e3e590636f5b8bb6672f77f |
|
MD5 | e19ac5d8b735cca77cf672fffc2a6352 |
|
BLAKE2b-256 | ea4afaa781177c5f274287f57efec13bb0b25d5d2e917dfc150af354c2b956c3 |