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.25

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.25
File Size Uploaded Provenance Actions
plotextractor-1.0.25.tar.gz 24.9 kB Without provenance Details for plotextractor-1.0.25.tar.gz

Built distribution (wheel)

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

Total release size: 54.7 kB

Release files / plotextractor-1.0.25.tar.gz

Download URL plotextractor-1.0.25.tar.gz
Size 24.9 kB
Tags Source
SHA-256 checksum
How to use checksums
08bc4f0dedb4f151a45b7e3d24b394ce1a0c9b754eaad2bde494d6ebbf9be26f
BLAKE2b-256 checksum
How to use checksums
2e77d87f6b9b6ae6f2622c68b089fa0e5e99e6f8444ca6fb00cdcf07d24209d1
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.25-py3-none-any.whl

Download URL plotextractor-1.0.25-py3-none-any.whl
Size 29.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7943bbce93b7d9875a012653fd7ca841214bcece8460381deabf095b8689c61a
BLAKE2b-256 checksum
How to use checksums
eeeada5e3a318e1e10186fd50f609d2988536f3cc37b6b67d9d956a01ec49003
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.25

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.25 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