Skip to main content

Make Matplotlib figures with the correct scale.

Project description

Scale your Matplotlib figures

Figure scale logo

Publication quality figures start here


  • QA: CI CodeQL pre-commit.ci status Quality Gate Status Coverage
  • Package: PyPI - Version PyPI - Python Version
  • Meta: Wizard Template Checked with mypy Hatch project Ruff PyPI - License EffVer Versioning

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. It also covers Localization, Style, Dimensions, and File Format of figures in Matplotlib.

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.0.tar.gz (34.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

figure_scale-0.1.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file figure_scale-0.1.0.tar.gz.

File metadata

  • Download URL: figure_scale-0.1.0.tar.gz
  • Upload date:
  • Size: 34.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for figure_scale-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7f86f94cac55f4e16802b1a620624282b4f40c718b0943695ca12558c52a1fb1
MD5 cb29048ae6ad111a89d347e5b9d4e3c9
BLAKE2b-256 45f247d93572a203cdbff2afc83a52285bbc8ddb2a72deac59a09109e723a93d

See more details on using hashes here.

Provenance

The following attestation bundles were made for figure_scale-0.1.0.tar.gz:

Publisher: ci.yaml on fschuch/figure-scale

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file figure_scale-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: figure_scale-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for figure_scale-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 79f3dd264830813b605a799f1aef5fca0ced7d8e330dd37306b78d37d2250009
MD5 71b30474f1276e8ac221169fde6178b4
BLAKE2b-256 d61aa7355b93f4ee8aead44d08d13dfdacf364a2044a1dc1a08af4b75d9a26c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for figure_scale-0.1.0-py3-none-any.whl:

Publisher: ci.yaml on fschuch/figure-scale

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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