Metadata-Version: 2.4
Name: plotextractor
Version: 1.0.24
Summary: A small library for extracting plots used in scholarly communication.
License-Expression: GPL-2.0-only
License-File: LICENSE
Keywords: plots,figures,extraction,TeX,LaTeX
Author: CERN
Author-email: admin@inspirehep.net
Requires-Python: >=3.11,<4
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: pdf2image (==1.17.0)
Requires-Dist: pillow (>=12.0.0)
Requires-Dist: pylatexenc (==2.11)
Requires-Dist: python-magic (>=0.4.27)
Project-URL: Homepage, https://github.com/inspirehep/plotextractor
Project-URL: Repository, https://github.com/inspirehep/plotextractor
Description-Content-Type: text/markdown

# plotextractor


## About

A small library for extracting plots used in scholarly communication.

## Install

``` console
$ pip install plotextractor
```

## Usage

To extract plots from a tarball:

``` python
>>> 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

## Local Development with docker

Build it using
```shell
docker build -t plotextractor  .
```
Spin up container with library installed
```shell
docker run -it plotextractor
```
Run tests
```
poetry run pytest .
```

