Version 2.0¶
PlotPy Version 2.0.3 (2023-12-22)¶
Bug fixes:
Issue #9 - MacOS:
error: a space is required between consecutive right angle brackets (use '> >')
PlotPy Version 2.0.2 (2023-12-15)¶
Bug fixes:
Issue #3 -
PlotWidget:ZeroDivisionErroron resize while ignoring constraintsIssue #4 - Average cross section:
RuntimeWarning: Mean of empty slice.Issue #5 - Contrast panel: levels histogram is sometimes not updated
Issue #6 - 1D Histogram items are not properly drawn
Issue #7 - Contrast panel: histogram may contains zeros periodically due to improper bin sizes
Issue #8 - Contrast panel: switch back to default tool after selecting min/max
PlotPy Version 2.0.1 (2023-11-29)¶
Bug fixes:
Fixed
plotpy.tools.AnnotatedEllipseTool:AttributeErrorwhen finalizing the shapeplotpy.widgets.select_with_shape_tool: added missingtoolbarandoptionsparametersitems.XRangeSelectionis now serializable, as expected
Documentation:
plotpy.plot.SyncPlotWindow: added missing documentationAdded more information on PlotPyStack
New “Motivation” section explaining the reasons behind the creation of PlotPy
PlotPy Version 2.0.0 (2023-10-25)¶
This version is the first release of the 2.0 series, which is distributed under the BSD 3-Clause License.
PlotPy 2.0 is a major release that brings a lot of new features and bug fixes.
When initiated in 2016, PlotPy 1.0 was the result of the merge of two projects (as well as some other changes, e.g. a redesign of the API):
guidata, a Python library generating graphical user interfaces for easy dataset editing and display
guiqwt, a Python library providing efficient 2D data-plotting features (curve/image visualization and related tools) for interactive computing and signal/image processing application development
With PlotPy 2.0, the guidata code base has been reextracted: PlotPy now relies on guidata as a dependency, like before the merge.
PlotPy 2.0 also integrates all the bug fixes (>30) and new features that were added to guiqwt since the merge (i.e. between 2016 and 2023).
Supported versions of Python and Qt bindings have been updated:
Python: 3.8, 3.9, and 3.10 (3.11 should work too, but will be officially supported when dropping support for Python 3.8, to keep a 3-year support period)
Qt bindings: PyQt5 (even if PyQt6 and PySide6 are not officially supported, efforts have been made and will continue to be made to support them)
PlotPy 2.0 is a major release because it also brings a lot of new features:
plot.PlotWidget,plot.PlotDialog, andplot.PlotWindow: API overhaul (simple, more consistent, more flexible, more extensible - see documentation for details)plot.SyncPlotWindow: new class to show multiple plots in a single window, in a synchronized way (zoom, pan, etc.)widgets.selectdialog.SelectDialog: a dialog box to select items using a shape tool (segment, rectangle or custom)Image lookup table (LUT):
Initially, the LUT alpha channel was either constant (input parameter
alphawas a float between 0 and 1) or linearly dependent on the image pixel values (when thealpha_maskparameter was enabled)Now, the LUT may be either constant (same as before) or dependent on the image pixel values but not only linearly: the LUT alpha channel may follow a linear, a sigmoid or an hyperbolic tangent function (see the new
alpha_functionparameter). The oldalpha_maskparameter was removed
Image pixels are now centered on their coordinates:
This means that the pixel at row
iand columnjis centered on the point(j, i)(before, the top-left corner of the pixel at rowiand columnjwas centered on the point(j, i))This convention is more consistent with the way images are displayed in other scientific image processing tools
This is one of the benefits of porting back guiqwt changes since the merge (i.e. between 2016 and 2023)
New SVG-based shapes:
items.RectangleSVGShape: rectangle shape based on SVG data or fileitems.SquareSVGShape: square shape based on SVG data or fileitems.CircleSVGShape: circle shape based on SVG data or file
builder.PlotBuilder:Renamed
PlotBuilder(originallyguiqwt.builder.PlotItemBuilder)Builder instance is still available using
from plotpy.builder import makePlot widget creation is now supported:
make.widget()forplot.PlotWidgetmake.dialog()forplot.PlotDialogmake.window()forplot.PlotWindow
Added support for more plot items:
make.contours()for generating a list ofitems.ContourItemobjectsmake.annotated_point()foritems.AnnotatedPointmake.polygon()foritems.PolygonShapemake.svg()foritems.RectangleSVGShape,items.SquareSVGShape, anditems.CircleSVGShape
Added JSON serialization support for all plot items (curve, image, etc.)
Brand new documentation, based on Sphinx with links to other projects API, examples and tutorials (e.g. on development related topics).
Black code formatting on all Python files
New automated test suite:
Automatic execution:
--unattendedcommand line option (Qt loop is bypassed)Test suite based on
pytest, supportingpytest-covfor coverage testing,pytest-xvfbfor headless testing, andpytest-qtfor Qt testingAdded support for Coverage: test coverage improved up to 70%
Added typing annotations on (almost) all Python files
Distribution: switched to
pyproject.toml(still relying onsetuptoolsandsetup.pyfor building Cython/C++ extensions)Added code quality configuration files:
.pylintrc: pylint configuration file.isort.cfg: isort configuration file.coveragerc: coverage configuration file
Added Visual Studio Code configuration files:
.vscode/settings.json: Python interpreter, code formatting, etc..vscode/tasks.json: build, test, etc..vscode/launch.json: run current file, run tests, etc.
PlotPy 2.0 also brings a lot of bug fixes and improvements:
Handled all Cython/C++ extensions compilation warnings
Fixed all NumPy deprecation issues (e.g.
numpy.matrix)Fixed (annotated) circle/ellipse item creation/test
Fixed all documentation build warnings
Fixed regressions introduced by PlotPy V1 on top of guiqwt:
Global references for the Debian package management
Major aspect ratio issues:
When resizing the plot widget (images were downsized indefinitely)
When auto-scaling the plot widget (images were not displayed entirely)
TrImageItemrotation algorithmOblique cross-section test
About dialog, version informations
Ported all guiqwt bug fixes since the merge (i.e. between 2016 and 2023):
Added support for Visual Studio 2015 and earlier
Speeding-up image alpha channel calculation
Optimized colormap icon caching
X-axis direction and auto-scale
Added load test (with a very large number of plot widgets)
Coordinates inversion in
EllipseShapeValueError with levels histogram
Various fixes regarding plot item creation, cross-section features, PyQt5 support, DICOM support, TIFF support, etc.
Etc.