Repository navigation
Releases
Releases · PlotPyStack/PythonQwt
PythonQwt v0.17.2-rc1
Immutable
release. Only release title and notes can be modified.
Release candidate 0.17.2rc1 of version 0.17.2, published on TestPyPI for testing only.
Version 0.17.2
v0.17.1
Immutable
release. Only release title and notes can be modified.
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
Immutable
release. Only release title and notes can be modified.
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()andQwtGraphic.toImage(size), which raised aTypeError(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 likeQwtGraphic.toPixmap()(Issue #115) - Fixed
QwtPlotMarker.legendIconfor markers with a symbol, which raised anAssertionErroror aTypeError: such markers can now be shown in a legend (Issue #115) - Fixed
QwtPlotGrid.make, which raised aTypeErrorwhen 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 aValueErrorwhen drawing a curve on an axis with a power scale (curve data are mapped as NumPy arrays), and anAttributeErrorwith NumPy < 2.0 (numpy.powdoes 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: enablingAtomicPaintertwice disabled it, andFullRepaintorCopyBackingStorecould not be disabled anymore once enabled (Issue #115) - Fixed painting into a
QwtGraphicwith clipping enabled, which raised aTypeErroron 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
QwtPainterCommandcopy constructor (QwtPainterCommand(other)), which raised anAttributeErrorfor state commands and aTypeError(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 byQwtLegend), whosenumRows()returned a float (e.g.2.5for 3 items on 2 columns) and which raised aTypeErrorwhen 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 aTypeErroron 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]), andQwtInterval.intersects, which gave the opposite result for intervals sharing a bound (e.g.Falsefor[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.qtdesignermodule, whose docstrings follow the Google style, is now rendered properly (it produced formatting errors), andQwtDateTimeScaleDrawandQwtDateTimeScaleEngineare now documented (Issue #115)
v0.16.3
Immutable
release. Only release title and notes can be modified.
Version 0.16.3
New features
- Added a Qt Designer plugin for
QwtPlot(Issue #18), restoring the Designer integration formerly provided by PyQwt'spyqtdesignerplugins:QwtPlotcan now be used as a promoted widget in.uifiles. Because PyQt6'suicinstantiates promoted widgets asQwtPlot(parent=...), whichQwtPlot's constructor rejected, the plugin promotes a thinQwtPlotWidgetsubclass exposing the standard__init__(self, parent=None)signature instead, leavingQwtPlotitself untouched
Bug fixes
- Fixed Issue #109: the
QwtPlotCanvas.BackingStorepaint attribute was non-functional. AfterinvalidateBackingStore()reset the buffer to an emptyQPixmap(),paintEventskipped the backing-store branch because of an extraisNull()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.setMouseTrackingwas ignored. Because the plot's drawing area is occupied by the canvas widget, mouse move events are delivered to the canvas rather than to theQwtPlotframe, so enabling mouse tracking on the plot had no effect.QwtPlot.setMouseTrackingnow propagates its state to the canvas (and a canvas installed viasetCanvasinherits 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.metricreturned an unscaled value (1) forPdmDevicePixelRatioScaled, instead of the fixed-point scale factor Qt expects for a 1.0 device pixel ratio (0x10000) - thanks to @Adrian-B-Moreira - Fixed a
TypeErrorraised inQwtScaleWidget.minimumSizeHintwhen an axis has its labels component disabled:QwtScaleDraw.getBorderDistHintreturned a float border distance (0, 1.0) in that case, which propagated into aQSize(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
Immutable
release. Only release title and notes can be modified.
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 distinctQFontit had seen (up to 1024 entries), each pinning its underlying font engine and, on Windows GDI builds, anHFONThandle, 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 rebuiltQFontMetricsresults - Fixed delayed release of native GDI handles caused by Python reference cycles:
QwtPlotItemandQwtPlotCanvasheld strong back-references to their parentQwtPlot, 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"
AttributeErrortracebacks at teardown on Python 3.14 / Qt 6: during widget destruction Qt still delivers events and calls size-hint methods onQwtPlotobjects whose Python__dict__has already been cleared. Access to private instance data inQwtPlot.eventFilterandQwtPlot.minimumSizeHintis 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 inQwtText.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
Immutable
release. Only release title and notes can be modified.
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
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 unnecessaryQObjectinheritance and added a font key cache to avoid expensiveQFonthashing on every text rendering operationQwtText: cached Qt alignment and text format flags as plain integers to bypassPyQt6enum overhead in hot pathsQwtText: enabled font key caching fast path for Qt 6, kept disabled for Qt 5 to preserve consistent text renderingQwtGraphicandQwtPainterCommand: cached Qt flags as integers to reduce per-command overhead, especially under PyQt6QwtScaleDraw,QwtScaleEngine,QwtScaleMapandQwtScaleDiv: 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
QPaintDevicewarnings onDevicePixelRatioandDevicePixelRatioScaledmetrics inQwtNullPaintDevice - Fixed integer division in
QwtScaleEngineso that medium ticks are actually produced (previously, the medium tick step was truncated to zero in some configurations) - Fixed
QwtScaleMaprectangle transform and degenerate scale handling (when source or destination interval has zero width)
Other changes
- Internal refactor: removed unnecessary
QObjectinheritance fromQwtText(QwtTextinstances are no longerQObjectsubclasses; this is an internal change with no impact on the public plotting API, but downstream code relying on Qt signals/slots onQwtTextinstances should be adapted) - Development workflow: replaced legacy
.batscripts with a unifiedscripts/run_with_env.pyenvironment 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
Immutable
release. Only release title and notes can be modified.
Version 0.15.0
- Added support for
QwtDateTimeScaleDrawandQwtDateTimeScaleEnginefor datetime axis support (seeQwtDateTimeScaleDrawandQwtDateTimeScaleEngineclasses in theqwtmodule) - Improved font rendering for rotated text in
QwtPlainTextEngine.drawmethod: disabled font hinting to avoid character misalignment in rotated text
v0.14.6
Version 0.14.6
- Fixed Issue #100 - TypeError in
QwtSymbol.drawSymbolmethod due to outdatedrenderSymbolscall - Fixed Issue #101 -
RuntimeWarning: overflow encountered in castwhen plottingnumpy.float32curve data - Merged PR #103: [FIX] wrong handling of
border.rectListwith PySide6 backend - thanks to @martinschwinzerl