Skip to main content

Qt plotting widgets for Python

Project description

PythonQwt: Qt plotting widgets for Python

license pypi version PyPI status PyPI pyversions download count Documentation Status

ℹ️ Created in 2014 by Pierre Raybaut and maintained by the PlotPyStack organization.

PythonQwt Test Launcher

The PythonQwt project was initiated to solve -at least temporarily- the obsolescence issue of PyQwt (the Python-Qwt C++ bindings library) which is no longer maintained. The idea was to translate the original Qwt C++ code to Python and then to optimize some parts of the code by writing new modules based on NumPy and other libraries.

The PythonQwt package consists of a single Python package named qwt and of a few other files (examples, doc, ...).

See documentation online or PDF for more details on the library and changelog for recent history of changes.

Sample

import qwt
import numpy as np

app = qwt.qt.QtGui.QApplication([])

# Create plot widget
plot = qwt.QwtPlot("Trigonometric functions")
plot.insertLegend(qwt.QwtLegend(), qwt.QwtPlot.BottomLegend)

# Create two curves and attach them to plot
x = np.linspace(-10, 10, 500)
qwt.QwtPlotCurve.make(x, np.cos(x), "Cosinus", plot, linecolor="red", antialiased=True)
qwt.QwtPlotCurve.make(x, np.sin(x), "Sinus", plot, linecolor="blue", antialiased=True)

# Resize and show plot
plot.resize(600, 300)
plot.show()

app.exec_()

Simple plot example

Examples (tests)

The GUI-based test launcher may be executed from Python:

from qwt import tests
tests.run()

or from the command line:

PythonQwt

Tests may also be executed in unattended mode:

PythonQwt-tests --mode unattended

Overview

The qwt package is a pure Python implementation of Qwt C++ library with the following limitations.

The following Qwt classes won't be reimplemented in qwt because more powerful features already exist in guiqwt: QwtPlotZoomer, QwtCounter, QwtEventPattern, QwtPicker, QwtPlotPicker.

Only the following plot items are currently implemented in qwt (the only plot items needed by guiqwt): QwtPlotItem (base class), QwtPlotItem, QwtPlotMarker, QwtPlotSeriesItem and QwtPlotCurve.

See "Overview" section in documentation for more details on API limitations when comparing to Qwt.

Roadmap

The qwt package short-term roadmap is the following:

  • Drop support for PyQt4 and PySide2
  • Drop support for Python < 3.8
  • Replace setup.py by pyproject.toml, using setuptools (e.g. see guidata)
  • Add more unit tests: the ultimate goal is to reach 90% code coverage

Dependencies

Requirements

  • Python >=3.8
  • PyQt5, PyQt6 or PySide6
  • QtPy >= 1.3
  • NumPy >= 1.5

Optional dependencies

  • coverage, pytest, pytest-qt, pytest-cov (for unit tests)
  • sphinx (for documentation generation)

Installation

From the source package:

python -m build

Copyrights

Main code base

  • Copyright © 2002 Uwe Rathmann, for the original Qwt C++ code
  • Copyright © 2015 Pierre Raybaut, for the Qwt C++ to Python translation and optimization
  • Copyright © 2015 Pierre Raybaut, for the PythonQwt specific and exclusive Python material

PyQt, PySide and Python2/Python3 compatibility modules

  • Copyright © 2009-2013 Pierre Raybaut
  • Copyright © 2013-2015 The Spyder Development Team

Some examples

  • Copyright © 2003-2009 Gerard Vermeulen, for the original PyQwt code
  • Copyright © 2015 Pierre Raybaut, for the PyQt5/PySide port and further developments (e.g. ported to PythonQwt API)

License

The qwt Python package was partly (>95%) translated from Qwt C++ library: the associated code is distributed under the terms of the LGPL license. The rest of the code was either wrote from scratch or strongly inspired from MIT licensed third-party software.

See included LICENSE file for more details about licensing terms.

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

PythonQwt-0.12.0.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

PythonQwt-0.12.0-py3-none-any.whl (1.0 MB view details)

Uploaded Python 3

File details

Details for the file PythonQwt-0.12.0.tar.gz.

File metadata

  • Download URL: PythonQwt-0.12.0.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for PythonQwt-0.12.0.tar.gz
Algorithm Hash digest
SHA256 19ad05243d2c74ed67cc45ae4c0bdd1257a323e034d9efe304891f461de4a585
MD5 0491eaf67a78e521f59a69b9178e0fbb
BLAKE2b-256 32316115702d9a88139d9529eca894e19eab64f2983f95389b5a145d1fc654d3

See more details on using hashes here.

Provenance

File details

Details for the file PythonQwt-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: PythonQwt-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for PythonQwt-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e5ac8abfc1cfa8c5c634331f145525850d91d13e64cacd0d848cd01bd12f47a
MD5 a9ba379c509db6bc15a94406a24085b9
BLAKE2b-256 05e23bb66740ca747a8fd821812f1abb4a44575a6dddbc12e5758920048b13b0

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