Metadata-Version: 2.4
Name: figure-scale
Version: 0.1.0
Summary: Make Matplotlib figures with the correct scale.
Project-URL: Source, https://github.com/fschuch/figure-scale
Project-URL: Tracker, https://github.com/fschuch/figure-scale/issues
Project-URL: Changelog, https://github.com/fschuch/figure-scale/releases
Author-email: fschuch <me@fschuch.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Matplotlib
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.9
Requires-Dist: matplotlib>=3.2.0
Provides-Extra: docs
Requires-Dist: docutils==0.21.2; extra == 'docs'
Requires-Dist: jupyter-book==1.0.4.post1; extra == 'docs'
Requires-Dist: sphinx-autobuild==2024.10.3; extra == 'docs'
Requires-Dist: sphinx-github-changelog==1.7.1; extra == 'docs'
Requires-Dist: sphinx==7.4.7; extra == 'docs'
Provides-Extra: tests
Requires-Dist: coverage[toml]>=7.5.3; extra == 'tests'
Requires-Dist: pint>=0.15.0; extra == 'tests'
Requires-Dist: pre-commit>=3.5.0; extra == 'tests'
Requires-Dist: pytest-cov>=5.0.0; extra == 'tests'
Requires-Dist: pytest>=8.2.2; extra == 'tests'
Provides-Extra: tests-extra
Requires-Dist: pytest-randomly==3.16.0; extra == 'tests-extra'
Requires-Dist: pytest-rerunfailures==15.1; extra == 'tests-extra'
Requires-Dist: pytest-xdist==3.8.0; extra == 'tests-extra'
Description-Content-Type: text/markdown

# Scale your Matplotlib figures

<p align="center">
<a href="https://github.com/fschuch/figure-scale"><img src="https://raw.githubusercontent.com/fschuch/figure-scale/refs/heads/main/docs/logo.png" alt="Figure scale logo" width="320"></a>
</p>
<p align="center">
    <em>Publication quality figures start here</em>
</p>

______________________________________________________________________

- QA:
  [![CI](https://github.com/fschuch/figure-scale/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/fschuch/figure-scale/actions/workflows/ci.yaml)
  [![CodeQL](https://github.com/fschuch/figure-scale/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/fschuch/figure-scale/actions/workflows/github-code-scanning/codeql)
  [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/fschuch/figure-scale/main.svg)](https://results.pre-commit.ci/latest/github/fschuch/figure-scale/main)
  [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=fschuch_figure-scale&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=fschuch_figure-scale)
  [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=fschuch_figure-scale&metric=coverage)](https://sonarcloud.io/summary/new_code?id=fschuch_figure-scale)
- Package:
  [![PyPI - Version](https://img.shields.io/pypi/v/figure-scale.svg?logo=pypi&label=PyPI)](https://pypi.org/project/figure-scale/)
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/figure-scale.svg?logo=python&label=Python)](https://pypi.org/project/figure-scale/)
- Meta:
  [![Wizard Template](https://img.shields.io/badge/Wizard-Template-%23447CAA)](https://github.com/fschuch/wizard-template)
  [![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
  [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
  [![PyPI - License](https://img.shields.io/pypi/l/figure-scale?color=blue)](https://github.com/fschuch/figure-scale/blob/master/LICENSE)
  [![EffVer Versioning](https://img.shields.io/badge/version_scheme-EffVer-0097a7)](https://jacobtomlinson.dev/effver)

______________________________________________________________________

## About

The `figure-scale` library is designed to help you create publication-quality figures with precise size control in Matplotlib.
It provides a convenient way to specify figure dimensions in various units (inches, millimeters, centimeters, points, etc.) and ensures consistent sizing across different plotting contexts.

**Key Features:**

- **Multiple unit support**: Specify dimensions in inches, millimeters, centimeters, points, and more, it is extendable by custom user provided units for convenience
- **Flexible sizing**: Define figures using width/height, or width/aspect, or height/aspect
- **Easy integration**: Works seamlessly with matplotlib's existing figure creation methods
- **Context management**: Use as context managers or decorators for localized figure sizing
- **Lightweight**: Minimal dependencies, built on top of Matplotlib only

Check out the documentation for more details on how to use the library and its features: <https://docs.fschuch.com/figure-scale>.

See also the blog post that inspired this package: [Publication-Quality Plots in Python with Matplotlib](https://www.fschuch.com/en/blog/2025/07/05/publication-quality-plots-in-python-with-matplotlib/). It also covers Localization, Style, Dimensions, and File Format of figures in Matplotlib.

## Copyright and License

© 2023 [Felipe N. Schuch](https://github.com/fschuch).
All content is under [MIT License](https://github.com/fschuch/figure-scale/blob/main/LICENSE).
