Skip to main content

Python bindings for PGPLOT

Project description

ppgplot

ppgplot - The Pythonic interface to PGPLOT, with support for both PGPLOT and Giza backends.

ppgplot is a python module (extension) providing bindings to the PGPLOT graphics library. PGPLOT is a scientific visualization (graphics) library written in Fortran by T. J. Pearson. C bindings for PGPLOT are also available. ppgplot makes the library usable by Python programs. It had support for the Numeric / numarray modules, but nowadays (>= Feb 2025) replaced by Numpy, to efficiently represent and manipulate vectors and matrices.

Installing

Since v1.5 (Apr 2025) the package should be pip-installable; it's a package on the PyPI:

    $> pip install python-pgplot
    $> python3
    >>> import ppgplot
    >>>

NOTE: Due to a package name collision, the PyPI project name is python-pgplot; the obvious package name was already claimed by something completely different

It is also possible to build the package from this git-repository. You may need to create a Python venv first. See below for detailed instructions.

    $> pip install [-e] .

Note: there is a separate old-python-3.6 branch based off master, with a how-to in the commit log(s). Of course nothing works out of the box on that system - only succeeded using an (old) Anaconda3.6 base package. YMMV.

Requirements

  • Python 3.7+
  • numpy >= 1.21.0
  • PGPLOT or Giza libraries installed
  • X11 development libraries
  • pkg-config

Installing the dependencies

On Linux use your favourite package manager, e.g.:

$> sudo apt-get install giza-dev libx11-dev pkg-config

Successful installation using Homebrew on Mac OSX with:

$> brew install libx11 giza pkgconf

Installation

In principle, this extension should build out-of-the-box in a Python venv, or, if you have it, a conda virtual environment (untested at the moment). The pyproject.toml file lists all dependencies and should (...) pull them into the venv as required for building/deploying:

$> cd /path/to/checkout/of/this/repo
$> pip install [-e] .

Without -e installs the extension in the venv, with the -e keeps the module in the current directory.

Using a bespoke PGPLOT or Giza backend

The extension configuration allows compiling + linking to a locally compiled PGPLOT or Giza library.

Obviously, first install or build PGPLOT and/or Giza on your system (should you want to compare them). Then build the extension, pointing the PGPLOT_DIR environment variable to the installation directory of the backend of choice:

$> PGPLOT_DIR=/path/to/pgplot pip install [-e] . 

Notes

FORTRAN? Srsly? Actually, for plotting large numbers of points or simple, yet precise control of the graphics, the FORTRAN based PGPLOT backend is convenient and fast (a lot faster than matplotlib, and still noticeably faster than Giza). However, the upside of investing those compute cycles is that the (anti-aliased!) fonts and graphics produced by the cairo library (the actual graphics backend used by Giza) are of an amazing quality.

If ppgplot is linked against the Giza library, it can produce output in .png and .pdf, also not something to be sneezed at.

All in all, the Giza backend is an amazing job done, but it is not 100% compatible with the original PGPLOT, so it is not guaranteed your plots will come out identical.

This fork of the Python-extension owes a lot of thanks to the original author, Nick Patavalis, of ppgplot: https://github.com/npat-efault/ppgplot

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

python_pgplot-1.6.0.tar.gz (28.5 kB view details)

Uploaded Source

Built Distributions

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

python_pgplot-1.6.0-cp314-cp314t-manylinux_2_28_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ x86-64

python_pgplot-1.6.0-cp314-cp314t-macosx_14_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.14tmacOS 14.0+ ARM64

python_pgplot-1.6.0-cp314-cp314-manylinux_2_28_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

python_pgplot-1.6.0-cp314-cp314-macosx_14_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.14macOS 14.0+ ARM64

python_pgplot-1.6.0-cp313-cp313-manylinux_2_28_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

python_pgplot-1.6.0-cp313-cp313-macosx_14_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

python_pgplot-1.6.0-cp312-cp312-manylinux_2_28_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

python_pgplot-1.6.0-cp312-cp312-macosx_14_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

python_pgplot-1.6.0-cp311-cp311-manylinux_2_28_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

python_pgplot-1.6.0-cp311-cp311-macosx_14_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

python_pgplot-1.6.0-cp310-cp310-manylinux_2_28_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

python_pgplot-1.6.0-cp310-cp310-macosx_14_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

python_pgplot-1.6.0-cp39-cp39-manylinux_2_28_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

python_pgplot-1.6.0-cp39-cp39-macosx_14_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.9macOS 14.0+ ARM64

python_pgplot-1.6.0-cp38-cp38-manylinux_2_28_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ x86-64

python_pgplot-1.6.0-cp38-cp38-macosx_14_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.8macOS 14.0+ ARM64

File details

Details for the file python_pgplot-1.6.0.tar.gz.

File metadata

  • Download URL: python_pgplot-1.6.0.tar.gz
  • Upload date:
  • Size: 28.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for python_pgplot-1.6.0.tar.gz
Algorithm Hash digest
SHA256 3af95c1aafd78994c6b46b4c478584c033eef32affb82c3c1d4e7fe07f6df48d
MD5 f2aae82fd464424f87d85edebbfc0a3d
BLAKE2b-256 044b65dea7e25cf62ed297462c7f8caf1f6f69e396dc5aca8469464bdde94a87

See more details on using hashes here.

File details

Details for the file python_pgplot-1.6.0-cp314-cp314t-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for python_pgplot-1.6.0-cp314-cp314t-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 937ac84dc746a042a0483380a9d9b3715ff8e36ce6deef95bae84f72ba1cd5f6
MD5 e9f60093d0b5e4b4747901fb86902be1
BLAKE2b-256 edd485d211657d147a71b447b20a87655429439d2f3d365c744f9e30b6562572

See more details on using hashes here.

File details

Details for the file python_pgplot-1.6.0-cp314-cp314t-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for python_pgplot-1.6.0-cp314-cp314t-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 bbe1ce9053ea459868b00b6944ac0c8620de8b4dcf2c9d450f50359ed7725d89
MD5 87e6fe19e62b3108f2119654f82a97b3
BLAKE2b-256 2432449684c14092b9f62782fcd27b5c6cdb7d1af5e7f45fdc4a6d60e51579f3

See more details on using hashes here.

File details

Details for the file python_pgplot-1.6.0-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for python_pgplot-1.6.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 385379e56619bc53685ac402105221b2389807dde94ceb9a469645c56ed2704d
MD5 5fcf64b88231f201fb40d862c0538b84
BLAKE2b-256 56aefbd9cebd2174a26d32a66c0f9ee37ee6299423997a54b5189bdc3127d1fb

See more details on using hashes here.

File details

Details for the file python_pgplot-1.6.0-cp314-cp314-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for python_pgplot-1.6.0-cp314-cp314-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 8386151a8f579c4149473579f7a66147db92c6d845534082243bd4a152bc5b69
MD5 99071d9793f746e4fb7a36c56ff44382
BLAKE2b-256 4a801d892cb9d6f01db1dc64d1e7acc70171e11054cde666c09bb8bd87aac0c3

See more details on using hashes here.

File details

Details for the file python_pgplot-1.6.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for python_pgplot-1.6.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 49de71ccf765414a3414bb3bafda410041a68dda95ad6058764508e8ba2b4a5f
MD5 74479b1c93cb9e766a012fa4de04fee1
BLAKE2b-256 e228bf8c57765daea2865e5d1e6a47957afa2018f4d2a1e8dad4249c47614c04

See more details on using hashes here.

File details

Details for the file python_pgplot-1.6.0-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for python_pgplot-1.6.0-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 75cce66e26c82f030716cdd4a7122473219f70a43b0e10342c7d974c6e0a3d37
MD5 7dae25e3ca83ee9cba63317d44387853
BLAKE2b-256 47912f3da1359a4f6e1343a3a60883ef7cbb1ec9c3e8998012f611748d1281b0

See more details on using hashes here.

File details

Details for the file python_pgplot-1.6.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for python_pgplot-1.6.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a6cc115aae68446c8c92021c39f6e50167208f11d9c83c49858a3c8d981e9b5d
MD5 65a1c7653bf1054f82b30ceea4e72862
BLAKE2b-256 31e57a18351e49252326916cb71872865155bc82f8d616a258c536b0c825b7c9

See more details on using hashes here.

File details

Details for the file python_pgplot-1.6.0-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for python_pgplot-1.6.0-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 116f2b3873c3a8381c2731d7313d518a77ab208de6c12badafc31eaad5545bda
MD5 2d600724a3e8c4e6ec12b88a220b9a44
BLAKE2b-256 42f5a51c4cc0f8689db3eb4831be143a81b5c6dca741b71b768a3119bd7b748b

See more details on using hashes here.

File details

Details for the file python_pgplot-1.6.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for python_pgplot-1.6.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 08496f576577327f43e549f08c79a84162ea34c1f6f066a9ee3a4d150a62e5a4
MD5 a49daa0168d497d21d425c7e1ecba22e
BLAKE2b-256 bd247dc65da52b197260a0b906e5545b0d78a4224e897f6fac46292a2d7e9b54

See more details on using hashes here.

File details

Details for the file python_pgplot-1.6.0-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for python_pgplot-1.6.0-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 be93ab98c6dc8af561b93e62b095fa175ee824ef86b49a6dc1c4ae5476ba5cb5
MD5 2c87cb7b20ccd4ae536b45f5dac76d86
BLAKE2b-256 a4e780de8621c5922803316ce93d0e8eba48f5ef47ba3ab33f30fc041852611b

See more details on using hashes here.

File details

Details for the file python_pgplot-1.6.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for python_pgplot-1.6.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5e586644da51ef74c3aedf4221bbf48a90f514a94ff84f3a8ecd80c09f805458
MD5 e225e2d41f3d22b83a768d22664c271c
BLAKE2b-256 7a10dbd2f56eae238ecb33ffb218ba39d673cace95756efe46d942c8cf0f263e

See more details on using hashes here.

File details

Details for the file python_pgplot-1.6.0-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for python_pgplot-1.6.0-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 89d1f96831f924a94d30f0c8bd99d71eae931df6e68c06b1f496a74515ef7459
MD5 5fb54a87f7842d305bb9ac325e36acfe
BLAKE2b-256 d39352dfedc4064705061ba9108490ea778bd7168141419d4af40c2308def8c2

See more details on using hashes here.

File details

Details for the file python_pgplot-1.6.0-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for python_pgplot-1.6.0-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ef9bb2712b1c5219454a79f280028c2ec2769b9022f4e32a5820c7f11c9e0a6e
MD5 26c478b04aeb19d3dac479421438bf7b
BLAKE2b-256 ab7c2a32fc4c180dbc5088fac48b7e23d80aa4df5711b37e7ffa57745a36c4b3

See more details on using hashes here.

File details

Details for the file python_pgplot-1.6.0-cp39-cp39-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for python_pgplot-1.6.0-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 019f44ce94abb3046c1f097f7d17ccad30e59027691dd59b8980f485ef0f5e9d
MD5 c5728f5dc416c81f33956e1b2d634420
BLAKE2b-256 953be257deb8c8de6b23887e6ce96b896ac8fa60ac9535dc7fbcb4b339cc74e3

See more details on using hashes here.

File details

Details for the file python_pgplot-1.6.0-cp38-cp38-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for python_pgplot-1.6.0-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 682cfea03af085c73d02ce86a2c6eaba4eba5cad8ce56f234b9aee29c7ef97a6
MD5 afba397812093559d80d241fbf3baa76
BLAKE2b-256 87986280f869ae2509e779bf25c819337dd740385157960c5f542b80a93b100b

See more details on using hashes here.

File details

Details for the file python_pgplot-1.6.0-cp38-cp38-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for python_pgplot-1.6.0-cp38-cp38-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 34e48783313a5b974d4aa38fa0c787e88d013d29781ddd2e9ad0bc3957f11968
MD5 f589342588f5bccfac228eda91ab0064
BLAKE2b-256 445cd9329f76234c07c1603d1f502089840511757a4277f99dea42860f3d3e9f

See more details on using hashes here.

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