Skip to main content

plotextractor

About

A small library for extracting plots used in scholarly communication.

Install

$ pip install plotextractor

System requirements

Image conversion relies on the following system packages:

  • Ghostscript: converts EPS/PS figures (used by Pillow)
  • Poppler: converts PDF figures (used by pdf2image)

On Debian/Ubuntu:

$ sudo apt-get install ghostscript poppler-utils

On macOS:

$ brew install ghostscript poppler

Usage

To extract plots from a tarball:

>>> from plotextractor import process_tarball
>>> plots = process_tarball('./1503.07589.tar.gz')
>>> print(plots[0])
{
    'captions': [
        u'Scans of twice the negative log-likelihood ratio $-2\\ln\\Lambda(\\mH)$ as functions of the Higgs boson mass \\mH\\ for the ATLAS and CMS combination of the \\hgg\\ (red), \\hZZllll\\ (blue), and combined (black) channels. The dashed curves show the results accounting for statistical uncertainties only, with all nuisance parameters associated with systematic uncertainties fixed to their best-fit values. The 1 and 2 standard deviation limits are indicated by the intersections of the horizontal lines at 1 and 4, respectively, with the log-likelihood scan curves.',
    ],
    'label': u'figure_LHC_combined_obs',
    'name': 'LHC_combined_obs_unblind_final',
    'original_url': './1503.07589.tar.gz_files/LHC_combined_obs_unblind_final.pdf',
    'url': './1503.07589.tar.gz_files/LHC_combined_obs_unblind_final.png',
}

License

GPLv2

Local Development with docker

Build it using

docker build -t plotextractor  .

Spin up container with library installed

docker run -it plotextractor

Run tests

poetry run pytest .

Metadata

Release files for plotextractor 1.0.26

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for plotextractor 1.0.26
File Size Uploaded Provenance Actions
plotextractor-1.0.26.tar.gz 24.9 kB Without provenance Details for plotextractor-1.0.26.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for plotextractor 1.0.26
File Interpreter ABI Platform Actions
plotextractor-1.0.26-py3-none-any.whl Python 3 none any Details for plotextractor-1.0.26-py3-none-any.whl

Total release size: 54.7 kB

Release files / plotextractor-1.0.26.tar.gz

Download URL plotextractor-1.0.26.tar.gz
Size 24.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6f5c1e2f0bb9467c20ff4c03107d8abbd369d56aa6b483269faa8c88202dfcfb
BLAKE2b-256 checksum
How to use checksums
52ab5de4665e772ceb717ca7cd4cf6421b8682019140913d2aba9f4993c6bf34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / plotextractor-1.0.26-py3-none-any.whl

Download URL plotextractor-1.0.26-py3-none-any.whl
Size 29.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9574122f8056aa9f027b6e9b47e7b6b2b02f5046951b48d9c52dc9bc4574d94d
BLAKE2b-256 checksum
How to use checksums
3e3ca55c86d8b01f944a6b0c59a19d64dac807de227f4c4d2954db25205aedda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for plotextractor 1.0.26

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.26 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page