Skip to main content

Small library for extracting plots used in scholarly communication.

Project description

https://travis-ci.org/inspirehep/plotextractor.svg?branch=master https://coveralls.io/repos/github/inspirehep/plotextractor/badge.svg?branch=master

About

A small library for extracting plots used in scholarly communication.

Install

$ pip install plotextractor

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',
}

Notes

If you experience frequent DelegateError errors you may need to update your version of GhostScript.

License

GPLv2

Changes

Version 0.2.2 (2019-10-24)

  • Try to preserve the ordering of figures.

Version 0.2.1 (2018-09-07)

  • Handle utf-8 in paths inside the tarball.

Version 0.2.0 (2018-02-07)

  • Ignore hidden/metadata files in the tarball.

  • Handle relative paths in the tarball.

Version 0.1.6 (2016-12-01)

  • Sets the mtime for all members of the tarball to current time before unpacking.

Version 0.1.5 (2016-05-25)

  • Properly raises an exception when no TeX files are found in an archive.

  • More fixes to image path extraction and more robust image handling.

Version 0.1.4 (2016-03-22)

  • Fixes linking images from TeX reference when images are referred to without specifying full relative folder path.

Version 0.1.3 (2016-03-17)

  • Properly supports cases where images are located in a nested folder inside the extracted tarballs root folder.

Version 0.1.2 (2015-12-08)

  • Adds wrapfigure support.

  • Catches problems with image conversions.

  • More robust handling of image rotations in TeX sources.

  • Removes unicode_literals usage.

Version 0.1.1 (2015-12-04)

  • Improves extraction from TeX file by reading files with encoding.

Version 0.1.0 (2015-10-19)

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

plotextractor-1.0.9.tar.gz (58.6 MB view details)

Uploaded Source

Built Distribution

plotextractor-1.0.9-py3-none-any.whl (48.1 kB view details)

Uploaded Python 3

File details

Details for the file plotextractor-1.0.9.tar.gz.

File metadata

  • Download URL: plotextractor-1.0.9.tar.gz
  • Upload date:
  • Size: 58.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for plotextractor-1.0.9.tar.gz
Algorithm Hash digest
SHA256 4a1034d599232e4f78b624cccecd780b2fb197521fd2b415f2c08e2fdb0428c3
MD5 34ba100d8d2803e8252e9c35e8239144
BLAKE2b-256 a88a7c9200e90d415bb03360a46047534e54cb9bf9022a2eeee51e1210d7c51a

See more details on using hashes here.

Provenance

File details

Details for the file plotextractor-1.0.9-py3-none-any.whl.

File metadata

File hashes

Hashes for plotextractor-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 2557ec967146ec8d9cb8b090cada110c9be33aad0a74895dfe50b43519c12290
MD5 552d93b554f3b2554d0d6fa86f936a46
BLAKE2b-256 0786bd718fdc3f8d1a7cacf9a0aad5d65413a9fd23627bb441ed702d62c3ca02

See more details on using hashes here.

Provenance

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