Skip to content

v0.17.0

Choose a tag to compare

@PierreRaybaut PierreRaybaut released this 30 Oct 09:10
· 1 commit to master since this release
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)