Skip to content

Releases

PythonQwt v0.17.2-rc1

PythonQwt v0.17.2-rc1 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 07 Nov 14:21
Immutable release. Only release title and notes can be modified.
v0.17.2-rc1
a14870f

Release candidate 0.17.2rc1 of version 0.17.2, published on TestPyPI for testing only.

Version 0.17.2

v0.17.1

Choose a tag to compare

@PierreRaybaut PierreRaybaut released this 31 Oct 12:38
Immutable release. Only release title and notes can be modified.
v0.17.1
de4e98a

Version 0.17.1

Bug fixes

  • Fixed the axis line (backbone) of bottom and right axes, which could be missing with a fractional screen scaling (e.g. 125% or 150%), depending on the position of the plot in the window: with the default hairline pen, this line was drawn on the edge of the axis widget, so that it could be rendered in the device pixel row (or column) just outside of the widget, where it was clipped. It is now drawn at the center of the first device pixel row (or column) of the axis, the rendering being unchanged with integer scale factors (e.g. 100% or 200%)

v0.17.0

Choose a tag to compare

@PierreRaybaut PierreRaybaut released this 30 Oct 09:10
Immutable release. Only release title and notes can be modified.
v0.17.0
e3e3ba0

Version 0.17.0

Requirements

  • Python 3.10 or later is now required. Python 3.9 users must keep an earlier compatible release.

Bug fixes

  • Fixed Issue #113: after replacing the scale draw of an axis (QwtPlot.setAxisScaleDraw), the axis ticks could be misaligned with the grid lines and plot items, until the next scale division change (e.g. after panning or zooming): a replot did not fix it. The new scale draw was laid out before getting the position and length of the previous one, so that the axis reserved space for its end labels that the canvas did not take into account. The new scale draw now takes the geometry of the previous one, and the axis stays aligned with the canvas
  • Fixed QwtGraphic.toPixmap(size), QwtGraphic.toImage() and QwtGraphic.toImage(size), which raised a TypeError (possibly aborting the process, as the painter was still active on the destroyed pixmap or image) instead of rendering the graphic: they now render it like QwtGraphic.toPixmap() (Issue #115)
  • Fixed QwtPlotMarker.legendIcon for markers with a symbol, which raised an AssertionError or a TypeError: such markers can now be shown in a legend (Issue #115)
  • Fixed QwtPlotGrid.make, which raised a TypeError when only some of the minor pen arguments (mincolor, minwidth, minstyle) were given: each of them is now honored, the missing ones taking their documented default value (Issue #115)
  • Fixed QwtPowerTransform, which raised a ValueError when drawing a curve on an axis with a power scale (curve data are mapped as NumPy arrays), and an AttributeError with NumPy < 2.0 (numpy.pow does not exist there): it now transforms scalars (with unchanged results) as well as NumPy arrays, with any supported NumPy version (Issue #115)
  • Fixed QwtPlotDirectPainter.setAttribute, which did not set or clear attributes as requested: enabling AtomicPainter twice disabled it, and FullRepaint or CopyBackingStore could not be disabled anymore once enabled (Issue #115)
  • Fixed painting into a QwtGraphic with clipping enabled, which raised a TypeError on each paint operation (aborting the process with PyQt's default exception hook): clipped paint operations are now recorded, and the bounding rectangle of the graphic is clipped as in Qwt (Issue #115)
  • Fixed the QwtPainterCommand copy constructor (QwtPainterCommand(other)), which raised an AttributeError for state commands and a TypeError (Qt objects cannot be pickled) for pixmap and image commands: commands of every type can now be copied, the copy being independent of the original (Issue #115)
  • Fixed QwtDynGridLayout (used by QwtLegend), whose numRows() returned a float (e.g. 2.5 for 3 items on 2 columns) and which raised a TypeError when laying out its items with vertical expansion (setExpandingDirections(Qt.Vertical)) (Issue #115)
  • Fixed canvas style sheets with rounded borders (e.g. plot.canvas().setStyleSheet("border: 2px solid black; border-radius: 8px;")), which raised a TypeError on each style change, resize and paint event (aborting the process with PyQt's default exception hook): the rounded border of the style sheet is now taken into account to clip the plot items and to fill the corners with the background of the parent widget, as in Qwt (Issue #115)
  • Fixed the image formats listed by the file dialog of QwtPlotRenderer.exportTo, which read *.b'bmp' *.b'png' ... instead of *.bmp *.png ... (Issue #115)
  • Fixed QwtInterval.intersect (and the & operator), which returned an invalid interval for partially overlapping intervals (e.g. QwtInterval(0, 2) & QwtInterval(1, 3) instead of [1, 2]), and QwtInterval.intersects, which gave the opposite result for intervals sharing a bound (e.g. False for [0, 1] and [1, 2]) (Issue #115)

Other changes

  • The source distribution now includes the Qt Designer plugin (qtdesigner/qwtplugin.py, see the "Qt Designer" section of the documentation) and this changelog (Issue #115)
  • Documentation: the reference of the qwt.qtdesigner module, whose docstrings follow the Google style, is now rendered properly (it produced formatting errors), and QwtDateTimeScaleDraw and QwtDateTimeScaleEngine are now documented (Issue #115)

v0.16.3

Choose a tag to compare

@PierreRaybaut PierreRaybaut released this 05 Jul 13:01
Immutable release. Only release title and notes can be modified.
v0.16.3
09b5324

Version 0.16.3

New features

  • Added a Qt Designer plugin for QwtPlot (Issue #18), restoring the Designer integration formerly provided by PyQwt's pyqtdesignerplugins: QwtPlot can now be used as a promoted widget in .ui files. Because PyQt6's uic instantiates promoted widgets as QwtPlot(parent=...), which QwtPlot's constructor rejected, the plugin promotes a thin QwtPlotWidget subclass exposing the standard __init__(self, parent=None) signature instead, leaving QwtPlot itself untouched

Bug fixes

  • Fixed Issue #109: the QwtPlotCanvas.BackingStore paint attribute was non-functional. After invalidateBackingStore() reset the buffer to an empty QPixmap(), paintEvent skipped the backing-store branch because of an extra isNull() guard, so the cache was never regenerated; the regenerated pixmap was also only bound to a local variable and never stored back. The double-buffering cache now refreshes and is reused as intended
  • Fixed Issue #88: QwtPlot.setMouseTracking was ignored. Because the plot's drawing area is occupied by the canvas widget, mouse move events are delivered to the canvas rather than to the QwtPlot frame, so enabling mouse tracking on the plot had no effect. QwtPlot.setMouseTracking now propagates its state to the canvas (and a canvas installed via setCanvas inherits the current state), so mouse move events are delivered even when no mouse button is pressed, as documented
  • Fixed Issue #110: the legend icon was rendered incorrectly because QwtNullPaintDevice.metric returned an unscaled value (1) for PdmDevicePixelRatioScaled, instead of the fixed-point scale factor Qt expects for a 1.0 device pixel ratio (0x10000) - thanks to @Adrian-B-Moreira
  • Fixed a TypeError raised in QwtScaleWidget.minimumSizeHint when an axis has its labels component disabled: QwtScaleDraw.getBorderDistHint returned a float border distance (0, 1.0) in that case, which propagated into a QSize(length + 2, dim) construction expecting integers

Other changes

  • Added a side-by-side plots example with a shared vertical scale, addressing Issue #33 (qwt/tests/test_issue33_sidebyside.py)

v0.16.2

Choose a tag to compare

@PierreRaybaut PierreRaybaut released this 20 Jun 07:59
Immutable release. Only release title and notes can be modified.
v0.16.2
7a769e4

Version 0.16.2

Bug fixes

  • Fixed a QFont/GDI handle leak that release 0.16.1 only masked: the font-key cache retained a strong reference to every distinct QFont it had seen (up to 1024 entries), each pinning its underlying font engine and, on Windows GDI builds, an HFONT handle, accumulating towards the per-process GDI limit. The cache is now a single-slot, leak-free memo and the remaining metrics caches use proper LRU eviction instead of a clear-on-overflow that periodically rebuilt QFontMetrics results
  • Fixed delayed release of native GDI handles caused by Python reference cycles: QwtPlotItem and QwtPlotCanvas held strong back-references to their parent QwtPlot, so plots were only reclaimed by the cyclic garbage collector. These back-references are now weak, matching the C++ Qwt parent/child model, so a plot is freed by reference counting alone and could otherwise exhaust the ~10000 GDI-object limit on Windows under heavy create/destroy churn
  • Fixed noisy "Unhandled exception" AttributeError tracebacks at teardown on Python 3.14 / Qt 6: during widget destruction Qt still delivers events and calls size-hint methods on QwtPlot objects whose Python __dict__ has already been cleared. Access to private instance data in QwtPlot.eventFilter and QwtPlot.minimumSizeHint is now guarded

Performance

  • Restored most of the text-layout performance lost to the GDI-leak fix by reinstating a bounded, leak-free id(font) fast path in QwtText.textSize (the layout cache holds a strong reference to its single cached font, so the font id cannot be reused)

Other changes

  • Added GDI-handle and font-cache telemetry/benchmark scripts under scripts/ (bench_gdi_loadtest.py, telemetry_fontcache.py) and a pytest stress test (qwt/tests/test_issue107_gdi_leak.py) to detect resource leaks under repeated plot create/render/destroy cycles

v0.16.1

Choose a tag to compare

@ThomasMalletCodra ThomasMalletCodra released this 15 Jun 15:01
Immutable release. Only release title and notes can be modified.
v0.16.1
64a9401

Version 0.16.1

Bug fixes

  • Fixed Issue #107: corrected a Windows crash/access violation that could occur in long-running sessions creating and rendering large amounts of data, due to GDI handle exhaustion caused by object lifetime and cache growth
  • Preserved the rendering performance improvements introduced in 0.16.0 while restoring safer Qt object ownership for internal text/scale-draw private data and adding defensive limits to font-metrics caches

v0.16.0

Choose a tag to compare

@PierreRaybaut PierreRaybaut released this 03 May 11:00
Immutable release. Only release title and notes can be modified.

Performance

  • Major performance optimizations addressing Issue #93 (rendering performance degradation with Qt 6, also benefitting Qt 5):
    • QwtText: removed unnecessary QObject inheritance and added a font key cache to avoid expensive QFont hashing on every text rendering operation
    • QwtText: cached Qt alignment and text format flags as plain integers to bypass PyQt6 enum overhead in hot paths
    • QwtText: enabled font key caching fast path for Qt 6, kept disabled for Qt 5 to preserve consistent text rendering
    • QwtGraphic and QwtPainterCommand: cached Qt flags as integers to reduce per-command overhead, especially under PyQt6
    • QwtScaleDraw, QwtScaleEngine, QwtScaleMap and QwtScaleDiv: micro-optimizations on the tick computation and coordinate transform code paths
  • Added benchmarking and visual regression scripts under scripts/ (bench_qt.ps1, bench_plotpy_loadtest.py, profile_loadtest.py, lineprofile_loadtest.py, capture_screenshots.py, diff_screenshots.py) to measure and validate rendering performance and correctness

Bug fixes

  • Merged PR #105: fixed legend icon being rendered incorrectly - thanks to @Adrian-B-Moreira
  • Fixed QPaintDevice warnings on DevicePixelRatio and DevicePixelRatioScaled metrics in QwtNullPaintDevice
  • Fixed integer division in QwtScaleEngine so that medium ticks are actually produced (previously, the medium tick step was truncated to zero in some configurations)
  • Fixed QwtScaleMap rectangle transform and degenerate scale handling (when source or destination interval has zero width)

Other changes

  • Internal refactor: removed unnecessary QObject inheritance from QwtText (QwtText instances are no longer QObject subclasses; this is an internal change with no impact on the public plotting API, but downstream code relying on Qt signals/slots on QwtText instances should be adapted)
  • Development workflow: replaced legacy .bat scripts with a unified scripts/run_with_env.py environment loader, refactored VS Code tasks, added coverage tasks and CI gating of PyPI deployment on the test suite passing
  • Documentation: updated README, Sphinx documentation, dependencies and added AI coding agent instructions

v0.15.0

Choose a tag to compare

@PierreRaybaut PierreRaybaut released this 24 Oct 14:11
Immutable release. Only release title and notes can be modified.

Version 0.15.0

  • Added support for QwtDateTimeScaleDraw and QwtDateTimeScaleEngine for datetime axis support (see QwtDateTimeScaleDraw and QwtDateTimeScaleEngine classes in the qwt module)
  • Improved font rendering for rotated text in QwtPlainTextEngine.draw method: disabled font hinting to avoid character misalignment in rotated text

v0.14.6

Choose a tag to compare

@PierreRaybaut PierreRaybaut released this 14 Sep 12:15

Version 0.14.6

  • Fixed Issue #100 - TypeError in QwtSymbol.drawSymbol method due to outdated renderSymbols call
  • Fixed Issue #101 - RuntimeWarning: overflow encountered in cast when plotting numpy.float32 curve data
  • Merged PR #103: [FIX] wrong handling of border.rectList with PySide6 backend - thanks to @martinschwinzerl

v0.14.5

Choose a tag to compare

@PierreRaybaut PierreRaybaut released this 12 Apr 08:39

Version 0.14.5

  • Merged PR #98: Fix legend still being visible after removed
  • Merged PR #99: Fix QRectF to QRect cast in QwtPainterClass.drawBackground