Make matplotlib figures with the coorect scale.
Project description
Scale your matplotlib figures
Publication quality figures start here
Usage
import matplotlib.pyplot as plt
import figure_scale as fs
figsize = fs.FigureScale(4.0, 2.0, units="in")
plt.rcParams.update({'figure.figsize' : figsize})
fig, ax = plt.subplots(figsize=figsize)
with figsize():
fig, ax = plt.subplots()
@figsize()
def my_plot():
...
Installation
pip install figure-scale
How to Contribute
-
Fork this project, clone your repository and make it your working directory.
-
To install the project, its development dependencies, and the pre-commit hooks, just run:
poetry install poetry shell
-
The regular maintenance tasks are handled by taskipy. You can see the available tasks by running:
$ task --list pre_commit_install pre-commit install test pytest pre_lint task pre_commit_install lint pre-commit run --all-files qa task lint && task test pre_docs poetry install --with docs docs jupyter-book build docs --path-output build pre_docs_serve task pre_docs docs_serve sphinx-autobuild docs build/_build/html
Type
task <task_name>
to run a task. For example, to run the tests, trytask qa
.
Copyright and License
© 2023 Felipe N. Schuch. All content is under MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
figure_scale-0.1.0b1.tar.gz
(5.0 kB
view hashes)
Built Distribution
Close
Hashes for figure_scale-0.1.0b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c2613699052024fa5b48d7948a1dcdb5a7f34d61fa95e9b8892a4f49c63964b |
|
MD5 | b3a4120b54ef9504b4b44bfe2ee38ba5 |
|
BLAKE2b-256 | 127cf74d44ec2a860bdb2a4358d6c066342446fdb10319a63c6cd3992be8ccbd |