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.9+
  • 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.1.tar.gz (28.6 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.1-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.1-cp314-cp314t-macosx_14_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.14tmacOS 14.0+ ARM64

python_pgplot-1.6.1-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.1-cp314-cp314-macosx_14_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.14macOS 14.0+ ARM64

python_pgplot-1.6.1-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.1-cp313-cp313-macosx_14_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

python_pgplot-1.6.1-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.1-cp312-cp312-macosx_14_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

python_pgplot-1.6.1-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.1-cp311-cp311-macosx_14_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

python_pgplot-1.6.1-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.1-cp310-cp310-macosx_14_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

python_pgplot-1.6.1-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.1-cp39-cp39-macosx_14_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.9macOS 14.0+ ARM64

File details

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

File metadata

  • Download URL: python_pgplot-1.6.1.tar.gz
  • Upload date:
  • Size: 28.6 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.1.tar.gz
Algorithm Hash digest
SHA256 0ac1cd4808a5b80a6e79dea4562ac4201028818ca890abf8cb06186585858919
MD5 ed5d6ed1668bd52ba619ecd45258b5ec
BLAKE2b-256 d1c23b255189437228f7a0da2d201feaca67f543d2071d4f7c17d10ccbb9e64a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_pgplot-1.6.1-cp314-cp314t-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 22a8b52950cebfd62612ee0481c59b1943b9a144b1f1edcbacc630a18ee87499
MD5 2ee6178d897184d926434c41c6b96265
BLAKE2b-256 1163a87b8813603ed76037fed2e01c845e41252cd0d5888d6aea9320d4a00bd3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_pgplot-1.6.1-cp314-cp314t-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 a43edd920293b0b7734c8996dcb9736ca2d965291ae284db18efe5cf14906480
MD5 9004795b23a6df9554e732ed7b0c2f24
BLAKE2b-256 d6fc96b0e4f978f9558a8e38db0b8527abf2798d7428fbb3c9e483907ee6ec8b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_pgplot-1.6.1-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5c83021787596503d5f2fd9df469c047e4d6db8d8f6ff80cf570795d3fca2825
MD5 061326021fd4838d8b8775b7fff06a60
BLAKE2b-256 8b471054f9d5e0e2a91e3edf00b580691a3721ca6836a4777430ea3d48d05e8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_pgplot-1.6.1-cp314-cp314-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 085d97448520ba08c3fcab80a118520de49afc72bfb79def25adb288a6409793
MD5 59edf67c80f5383fd6021d6dff9ebb18
BLAKE2b-256 f28388ccbd3e36a0a904159372e5bead6c26e0a32cdddc390e659a7cd89e58c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_pgplot-1.6.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 72fcc6dfd719b5cb6de7ff9d5be770c13296d2616ca2b8063298d7c7e2fbdd65
MD5 665e572c247bf30da436a04a0cd36523
BLAKE2b-256 e6d9d814e5615db5a5d444de07fff8993bdb55dfbbf7470a8b6d4c91ebabdfe4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_pgplot-1.6.1-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 f9ea2b0a94557d1934a90b8dd75a95e3df9aec9cb572f70ebaa0a52279ee3129
MD5 de3a971bcf9df9c9267ff2a2f70d9e7e
BLAKE2b-256 1a539accc7b0bdbfd54e113fa38dc7869892160bdcff66bd2dece819e59076e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_pgplot-1.6.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e0c48e402ee56c72d86e27ce127b1315f90ae65d49ac1bb78fa1bc682a0af028
MD5 a1354bc9b6090c0f730a268750cd29d1
BLAKE2b-256 6d47bb6f828394c1ba8d733f55e644c3f2aea46bf6b9f71ff47be00732fc3325

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_pgplot-1.6.1-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 d9d2d3b11bae64fdb54c6c1b24013d1d7a3585075d428c16648f4fa4ac7c3dec
MD5 b226e5230ae8d6bdbb2bd35ae2bb707b
BLAKE2b-256 656234fc676d68644711c79ec69a86cec04d753a239d0df866a86c0f18ea044d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_pgplot-1.6.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 859024789a3085cc3a7f10eec5035518dea05c4778efa0b0042234b7e25ed56b
MD5 1b646fbf6fa08ad61cec37947ba7ffb7
BLAKE2b-256 b7338fc82ebcfa8f43b7a401254c6e20e6ec91bd10fbfba01af024865a35e87c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_pgplot-1.6.1-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 9be914dd88c1d56d405bbe5635f2214b0c47043b17b677d3c3328e58d27bacd9
MD5 96442c1d7f1c522bb8d955142f2e362d
BLAKE2b-256 4f0004dbb689b8c09bead385cf83a136d3143230e170ec15946b64cc9d63712f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_pgplot-1.6.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cbb1157a181c5b9732a4d23eb5f78cb3cee830d12f81b40a5852b31e0ee53282
MD5 e2bb10d258b8ae7da21cb7bb853b078e
BLAKE2b-256 a2ce0dfa666dc0fd9b327ea3a17cd1438694caca52422fd173c96e8d240c4fe5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_pgplot-1.6.1-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 e14b0b011defe53ce0b6b37dece7153d93dc968f012cf8c2a08025a68adf0805
MD5 bb45b0bc3c043b02c67e481210786859
BLAKE2b-256 99203a5b8106d43bc35d51d4d4f906de049971acaece235113cbcf50844177a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_pgplot-1.6.1-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9b07da5b58bb3b02b17472f11885048017d855b964fab8a4a871483f85e93ea4
MD5 4584055699ed5a82055313548b1c6672
BLAKE2b-256 7dcbfb0c1afe5add2f07a6c33d7df4d6c7ade4a5134ef346813161ae8d83dc73

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_pgplot-1.6.1-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 1b3da94983dce423410ea4eb880ec0362cd025fae70c6cf14ce4fdff7ad17f06
MD5 153bb83b33ee506781964706664591cb
BLAKE2b-256 090ee9bc220a6641c4feb58cd9b8708c20751f8da5028c3685d919a9412edb7b

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