Skip to main content

Make matplotlib figures with the coorect scale.

Project description

Scale your matplotlib figures

Wizard

Publication quality figures start here


Poetry Ruff Code style: black CI codecov CodeFactor

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

  1. Fork this project, clone your repository and make it your working directory.

  2. To install the project, its development dependencies, and the pre-commit hooks, just run:

    poetry install
    poetry shell
    
  3. 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, try task qa.

Copyright and License

© 2023 Felipe N. Schuch. All content is under MIT License.

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

figure_scale-0.1.0b1.tar.gz (5.0 kB view hashes)

Uploaded Source

Built Distribution

figure_scale-0.1.0b1-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page