Scientific Graphics and GUI Library for Python (original) (raw)

A variety of plotting capabilities.[source]


Image analysis with automated data slicing.


3D graphics: volumetric rendering, surface plots, scatter plots, and isosurfaces.


A variety of Region of Interest (ROI) types. Each ROI selects data from the underlying image and redisplays it below.[source]


Programmable flowcharts for fast prototyping.


For an example of PyQtGraph in use (and more screenshots), seeACQ4

PyQtGraph

Scientific Graphics and GUI Library for Python

Install from PyPI:

pip install pyqtgraph

or via conda:

conda install -c conda-forge pyqtgraph

or fromsource on GitHub:

git clone https://github.com/pyqtgraph/pyqtgraph
cd pyqtgraph
pip install .

recent changes - older releases

PyQtGraph is a pure-python graphics and GUI library built onPyQt / PySide andnumpy. It is intended for use in mathematics / scientific / engineering applications. Despite being written entirely in python, the library is very fast due to its heavy leverage of NumPy for number crunching andQt's GraphicsView framework for fast display. PyQtGraph is distributed under theMIT open-source license.

Main Features

Basic 2D plotting in interactive view boxes

Image display with interactive lookup tables and level control

3D graphics system (requires Python-OpenGL bindings)

Data selection/marking and region-of-interest controls

Easy to generate new graphics

Library of widgets and modules useful for science/engineering applications

Requirements

PyQtGraph is known to run on Linux, Windows, and OSX.
It should, however, run on any platform which supports the following packages:

Documentation

Documentation is hostedhere.
If you would like to request a specific section of documentation, please ask on theforum. There are also many examples to look through; for a menu of examples run:

python -m pyqtgraph.examples

Packaging for Distribution

Applications written with pyqtgraph may be packaged as Windows exe files using py2exe or OSX dmg files using py2app.

Questions, feedback, and bug reports

Comparison to other python graphics packages

Matplotlib is more or less the de-facto standard plotting library for python. If you are starting a new project and do not need any of the features specifically provided by pyqtgraph, you should start with matplotlib. It is much more mature, has an enormous user community, and produces very nice publication-quality graphics.

Reasons you might want to use pyqtgraph instead:

  1. Speed. If you are doing anything requiring rapid plot updates, video, or realtime interactivity, matplotlib is not the best choice. This is (in my opinion) matplotlib's greatest weakness.
  2. Portability / ease of installation. PyQtGraph is a pure-python package, which means that it runs on virtually every platform supported by numpy and PyQt, no compiling required. If you require portability in your application, this can make your life a lot easier.
  3. Many other features--pyqtgraph is much more than a plotting library; it strives to cover many aspects of science/engineering application development with more advanced features like its ImageView and ScatterPlotWidget analysis tools, ROI-based data slicing, parameter trees, flowcharts, multiprocessing, and more.

VisPy is a new 2D/3D visualization library based on OpenGL that is developed as a collaboration between the authors of PyQtGraph, VisVis, Galry, and Glumpy. It is presently in early development and has a narrower scope than PyQtGraph--it will focus on visualization without the GUI toolkit features provided by PyQtGraph. In the long term, we hope VisPy will be able to replace Qt as the rendering engine for 2D graphics, and replace the pyqtgraph.opengl 3D system entirely.More about VisPy here.

PyQwt has a very nice set of features and is fast enough for realtime work. Its main drawback is that it is currently unmaintained and can be difficult to get working on a variety of platforms. Hopefully in the future it may find a new maintainer, but until then it may be best to avoid PyQwt (the original PyQwt maintainer is currently recommending to use pyqtgraph instead; check their mailing lists for updates). Like matplotlib, PyQwt lacks some of the more advanced features of pyqtgraph.Chaco is a very interesting project--nice graphics, good speed, and actively developed. Like PyQwt, however, Chaco can be challenging to install on a wide variety of platforms and lacks some of pyqtgraph's more advanced features (although pyqtgraph certainly lacks many of Chaco's features as well).GuiQwt is an interesting project with many advanced features similar to pyqtgraph. It is presently based on PyQwt and thus comes with some of its drawbacks, although there appear to be plans to change this in the future.