Repository navigation
Releases: PlotPyStack/PlotPy
Release list
v2.5.1
ℹ️ Release V2.5.0 was a fugitive release that was replaced by V2.5.1 due to packaging issues.
In this release, test coverage is 79%.
💥 New features / Enhancements:
-
Alternative dictionary argument for plot options:
- This new feature was introduced in the context of the cyclic import bug fix, to avoid importing the
plotpy.plotmodule just to get thePlotOptionsorBasePlotOptionsclasses - All classes (and a few functions) that used to take an
optionsargument as aBasePlotOptionsorPlotOptionsinstance now also accept a dictionary argument with the same keys as theBasePlotOptionsorPlotOptionsclass attributes, and the same values as the corresponding attributes - This concerns the following classes and functions:
plotpy.plot.BasePlotplotpy.plot.PlotWidgetplotpy.plot.PlotDialogplotpy.plot.PlotWindowplotpy.plot.SubPlotWidgetplotpy.plot.SyncPlotWindowplotpy.tools.RotateCropToolplotpy.widgets.fit.FitDialogplotpy.widgets.fliprotate.FlipRotateDialogplotpy.widgets.rotatecrop.RotateCropDialogplotpy.widgets.selectdialog.SelectDialogplotpy.widgets.selectdialog.select_with_shape_tool
- This new feature was introduced in the context of the cyclic import bug fix, to avoid importing the
-
Added "Lock LUT range" option for image items:
- This new option is disabled by default, which matches the previous behavior: when updating an image item data, the LUT range is automatically adjusted to the new data range (if not passed as an argument to the
BaseImageItem.set_datamethod) - When enabled, the LUT range is locked and the LUT range is not adjusted when updating the image item data
- The option is available in image parameters dialog
- A new tool
LockLUTRangeToolhas been implemented to toggle the option from the plot context menu: the tool is not registered by default in the plot widget, but can be added by the host application if needed - See test script
tests.features.test_image_data_updatefor an example of usage of the new option and tool
- This new option is disabled by default, which matches the previous behavior: when updating an image item data, the LUT range is automatically adjusted to the new data range (if not passed as an argument to the
-
Added missing
set_stylemethod toXRangeSelectionclass: this method is used to set the style of the range selection item from configuration options
🛠️ Bug fixes:
- Issue #19 - Fix
distutilsdeprecation in setup.py: replaceddistutils.corebysetuptoolsin the setup.py script to avoid the deprecation warning when building the package with Python 3.10 and 3.11, and to ensure compatibility with earlier Python versions (PlotPy is already compatible with the most recent Python versions: this only concerns the build system) - Fix cyclic import in
plotpy.toolsmodule:- Some tools in
plotpy.toolssubpackage were importing theplotpy.plotmodule, which was importing theplotpy.toolsmodule, causing a cyclic import issue - This is now fixed by introducing new constants for axis IDs in the
plotpy.constantsmodule, and using them everywhere in the code, thus avoiding to import theplotpy.plotmodule just to get the axis IDs
- Some tools in
- Fix empty label in X/Y cross section plots:
- This is a regression introduced in V2.1.0
- When showing the X/Y cross section plots (using the plot context menu), an empty label was displayed at the center of each of those plots
- The label now shows "Enable a marker" as previously
- Fix historic unexpected behavior of interactive tools:
- When triggering an interactive tool (e.g. by clicking on the corresponding toolbar button), the tool
activatemethod was called twice, which was not expected, but was not causing any issue given the current implementation - However, when defining custom interactive tools, this behavior could lead to unexpected results (i.e. really executing activation actions twice)
- This is now fixed: the
activatemethod is called only once when triggering an interactive tool
- When triggering an interactive tool (e.g. by clicking on the corresponding toolbar button), the tool
v2.4.2
Version 2.4.2
In this release, test coverage is 79%.
🛠️ Bug fixes:
- Issue #17:
- Debian's Python team has reported that the contour unit test was failing on
arm64
architecture - This is the opportunity to replace the
contour2dCython extension by scikit-image's
find_contoursfunction, thus avoiding to reinvent the wheel by relying on a more
robust and tested implementation - The
contour2dCython extension is removed from the source code - The contour related features remain the same, but the implementation is now based on
scikit-image'sfind_contoursfunction - The scikit-image dependency is added to the package requirements
- Debian's Python team has reported that the contour unit test was failing on
v2.4.1
Version 2.4.1
In this release, test coverage is 79%.
🛠️ Bug fixes:
- Contrast adjustment panel:
- A regression was introduced in V2.0.0: levels histogram was no longer removed from
contrast adjustment panel when the associated image was removed from the plot - This is now fixed: when an image is removed, the histogram is removed as well and
the contrast panel is refreshed (which was not the case even before the regression)
- A regression was introduced in V2.0.0: levels histogram was no longer removed from
Version 2.4.0
In this release, test coverage is 79%.
💥 New features / Enhancements:
- Contrast adjustment panel:
- New layout: the vertical toolbar (which was constrained in a small area on the
right side of the panel) is now a horizontal toolbar at the top of the panel,
beside the title - New "Set range" button: allows the user to set manually the minimum and maximum
values of the histogram range
- New layout: the vertical toolbar (which was constrained in a small area on the
- New Z-axis logarithmic scale feature:
- Added new tool
ZAxisLogToolto toggle the Z-axis logarithmic scale - The tool is registered by default in the plot widget, like the
ColormapTool - When enabled, the active image item is displayed after applying a base-10
logarithm to its pixel values
- Added new tool
- Curve statistics tool
CurveStatsToolis now customizable:- When adding the tool:
plot_widget.manager.add_tool(CurveStatsTool, labelfuncs=(...)) - Or after:
plot_widget.manager.get_tool(CurveStatsTool).set_labelfuncs(...) - The
labelfuncsparameter is a list of tuples(label, func)wherelabelis the
label displayed in the statistics table, andfuncis a function that takes the
curve data and returns the corresponding statistic value (see the documentation for
more details)
- When adding the tool:
- Image statistics tool
ImageStatsToolis now customizable:- When adding the tool:
plot_widget.manager.add_tool(ImageStatsTool, stats_func=...) - Or after:
plot_widget.manager.get_tool(ImageStatsTool).set_stats_func(...) - The
stats_funcparameter is a function that takes the image item and selected
rectangle coordinates, and returns a string with the statistics to display
- When adding the tool:
- New
SIG_AXIS_PARAMETERS_CHANGEDsignal emitted byBasePlotwhen the axes parameters
are changed (e.g. when the axes are inverted, or the scale is changed) - New "Reverse X axis" feature:
- Added new tool
ReverseXAxisToolto toggle the X-axis direction - The tool is registered by default in the plot widget, like its Y-axis counterpart
- Added new tool
🛠️ Bug fixes:
- Contrast adjustment panel:
- Fixed histogram update issues when no image was currently selected (even if the
an image was displayed and was selected before) - Histogram range was not updated when either the minimum or maximum value was set
using the "Minimum value" or "Maximum value" buttons (which have been renamed to
"Min." and "Max." in this release) - Histogram range was not updated when the "Set full range" button was clicked
- Fixed histogram update issues when no image was currently selected (even if the
- Image parameters: contrast range was not updated when the image Z axis bounds were
changed using the "Parameters" dialog
🧹 API cleanup:
- Deprecated
AnnotationParam.update_annotationmethod: useupdate_iteminstead - Deprecated
AxesShapeParam.update_axesmethod: useupdate_iteminstead - Deprecated
AxesParam.update_axesmethod: useupdate_iteminstead - Deprecated
ImageAxesParam.update_axesmethod: useupdate_iteminstead - Deprecated
LabelParam.update_labelmethod: useupdate_iteminstead - Deprecated
MarkerParam.update_markermethod: useupdate_iteminstead - Deprecated
RangeShapeParam.update_rangemethod: useupdate_iteminstead - Deprecated
ShapeParam.update_shapemethod: useupdate_iteminstead
v2.4.0
Version 2.4.0
In this release, test coverage is 79%.
💥 New features / Enhancements:
- Contrast adjustment panel:
- New layout: the vertical toolbar (which was constrained in a small area on the
right side of the panel) is now a horizontal toolbar at the top of the panel,
beside the title - New "Set range" button: allows the user to set manually the minimum and maximum
values of the histogram range
- New layout: the vertical toolbar (which was constrained in a small area on the
- New Z-axis logarithmic scale feature:
- Added new tool
ZAxisLogToolto toggle the Z-axis logarithmic scale - The tool is registered by default in the plot widget, like the
ColormapTool - When enabled, the active image item is displayed after applying a base-10
logarithm to its pixel values
- Added new tool
- Curve statistics tool
CurveStatsToolis now customizable:- When adding the tool:
plot_widget.manager.add_tool(CurveStatsTool, labelfuncs=(...)) - Or after:
plot_widget.manager.get_tool(CurveStatsTool).set_labelfuncs(...) - The
labelfuncsparameter is a list of tuples(label, func)wherelabelis the
label displayed in the statistics table, andfuncis a function that takes the
curve data and returns the corresponding statistic value (see the documentation for
more details)
- When adding the tool:
- Image statistics tool
ImageStatsToolis now customizable:- When adding the tool:
plot_widget.manager.add_tool(ImageStatsTool, stats_func=...) - Or after:
plot_widget.manager.get_tool(ImageStatsTool).set_stats_func(...) - The
stats_funcparameter is a function that takes the image item and selected
rectangle coordinates, and returns a string with the statistics to display
- When adding the tool:
- New
SIG_AXIS_PARAMETERS_CHANGEDsignal emitted byBasePlotwhen the axes parameters
are changed (e.g. when the axes are inverted, or the scale is changed) - New "Reverse X axis" feature:
- Added new tool
ReverseXAxisToolto toggle the X-axis direction - The tool is registered by default in the plot widget, like its Y-axis counterpart
- Added new tool
🛠️ Bug fixes:
- Contrast adjustment panel:
- Fixed histogram update issues when no image was currently selected (even if the
an image was displayed and was selected before) - Histogram range was not updated when either the minimum or maximum value was set
using the "Minimum value" or "Maximum value" buttons (which have been renamed to
"Min." and "Max." in this release) - Histogram range was not updated when the "Set full range" button was clicked
- Fixed histogram update issues when no image was currently selected (even if the
- Image parameters: contrast range was not updated when the image Z axis bounds were
changed using the "Parameters" dialog
🧹 API cleanup:
- Deprecated
AnnotationParam.update_annotationmethod: useupdate_iteminstead - Deprecated
AxesShapeParam.update_axesmethod: useupdate_iteminstead - Deprecated
AxesParam.update_axesmethod: useupdate_iteminstead - Deprecated
ImageAxesParam.update_axesmethod: useupdate_iteminstead - Deprecated
LabelParam.update_labelmethod: useupdate_iteminstead - Deprecated
MarkerParam.update_markermethod: useupdate_iteminstead - Deprecated
RangeShapeParam.update_rangemethod: useupdate_iteminstead - Deprecated
ShapeParam.update_shapemethod: useupdate_iteminstead
v2.3.5
Version 2.3.5
This release is mainly intended to fix the Windows binary distribution, which was not
supporting NumPy 2.0.
🛠️ Bug fixes:
-
Moved back
conftest.pyto thetestsfolder (was in the root folder), so that
pytestcan be executed with proper configuration when running the test suite
from the installed package -
Removed benchmarks from automated test suite (not relevant for the end user):
addedplotpy-benchmarksscript to run the benchmarks
v2.3.4
Version 2.3.4
In this release, test coverage is 79%.
🛠️ Bug fixes:
-
Add support for NumPy 2.0:
- Updated build system to use NumPy 2.0 on Python > 3.8 and NumPy 1 on Python 3.8
- Use
numpy.asarrayinstead ofnumpy.array(..., copy=False) - Use
numpy.isininstead ofnumpy.in1d - Use
scipy.integrate.trapezoidinstead ofnumpy.trapz
-
ColorMapManager: fix segmentation fault with PySide6 on Linux
v2.3.3
Version 2.3.3
In this release, test coverage is 79%.
🛠️ Bug fixes:
- Moved up
LineCrossSectionimport for consistency with other cross-section panels - Unexpected behavior regarding
io.load_itemsandio.save_itemsfunctions:- Those functions were serializing and deserializing most of the parameters of the
plot items, but not their visibility state - This is now fixed: the visibility state of the plot items is now saved and restored
as expected
- Those functions were serializing and deserializing most of the parameters of the
ℹ️ Other changes:
- Explicitely exclude NumPy V2 from the dependencies (not compatible yet)
v2.3.2
Version 2.3.2
In this release, test coverage is 79%.
Version 2.3.2 fixes a blocking issue with the colormap editor unit test introduced
in version 2.3.1. The latter is a fugitive release that was not announced.
💥 New features / Enhancements:
- Colormap: added "Apply" button to the colormap manager
- Automated test suite:
- Test coverage has been improved from 75% to 79%
- The following features are now covered by unit tests:
- Panning with the mouse move events
- Zooming with the mouse wheel/move events
- Curve statistics tool
- Image rotation and translations via
SelectTool(simulating mouse events) - Masked areas in images and
ImageMaskTool LockTrImageTool- Cursor tools (
HCursorTool,VCursorTool,XCursorToolandHRangeTool) DisplayCoordsTool: simulation of 'Alt' and 'Ctrl' keys- Complete coverage for
MultiLineToolandFreeFormTool - Selection tools (
RectangularSelectionToolandSelectTool)
🛠️ Bug fixes:
- Image statistics tool: fixed "No available data" message when the tool rectangular
region top Y coordinate is above the image top Y coordinate - Label items (
LabelItem,LegendBoxItem,DataInfoLabel, ...) were not emitting
theSIG_ITEM_MOVEDsignal when moved interactively (with the mouse) if the item
anchor was attached to the canvas - Colormap: fixed context menu entry update (colormap icon was updated as expected, but
the colormap name was not) - Rotate/crop dialog: added missing toolbar on plot widget
- Flip/rotate dialog: added missing toolbar on plot widget
- Fixed issue with oblique averaged cross section computation (
AttributeErrorwhen
clicking on the empty cross section plot)
Version 2.3.0
In this release, test coverage is 75%.
💥 New features:
- Added support for colormap inversion:
- The user can now invert the colormap of an image item:
- From the image parameters dialog ("Invert colormap" checkbox)
- From the plot context menu (right-click on the image item)
BaseImageItem.set_color_mapmethod takes a newinvertparameter (which
defaults toNone, meaning that the behavior is unchanged)- New
ReverseColormapTool: registered by default in the plot widget, like the
ColormapTool(add the "Invert colormap" entry in the context menu of the image)
- The user can now invert the colormap of an image item:
🛠️ Bug fixes:
ErrorBarCurveItem: fixed NumPy deprecation warning
("Conversion of an array with ndim > 0 to a scalar is deprecated [...]")
ℹ️ Other changes:
- Image plot items deserialization:
- When an image plot item is deserialized, and needs to be reloaded from a file,
the file path is adapted to the current working directory if file is not found
(this is the legacy behavior). - An unnecessary call to
ImageIOHandler.adapt_pathmethod was removed from the
RawImageItem.deserializemethod: this issue has to be handled by the host
application, not by the PlotPy library. ImageIOHandler: removedadd_change_pathandadapt_pathmethods
- When an image plot item is deserialized, and needs to be reloaded from a file,
- Fix typo in
tests.features.test_colormap_editormodule: renamed function
test_colormap_managertotest_colormap_editor - Removed unnecessary
BaseImageItem.get_color_map_namemethod
v2.3.1
Version 2.3.1
In this release, test coverage is 79%.
💥 New features / Enhancements:
- Colormap: added "Apply" button to the colormap manager
- Automated test suite:
- Test coverage has been improved from 75% to 79%
- The following features are now covered by unit tests:
- Panning with the mouse move events
- Zooming with the mouse wheel/move events
- Curve statistics tool
- Image rotation and translations via
SelectTool(simulating mouse events) - Masked areas in images and
ImageMaskTool LockTrImageTool- Cursor tools (
HCursorTool,VCursorTool,XCursorToolandHRangeTool) DisplayCoordsTool: simulation of 'Alt' and 'Ctrl' keys- Complete coverage for
MultiLineToolandFreeFormTool - Selection tools (
RectangularSelectionToolandSelectTool)
🛠️ Bug fixes:
- Image statistics tool: fixed "No available data" message when the tool rectangular
region top Y coordinate is above the image top Y coordinate - Label items (
LabelItem,LegendBoxItem,DataInfoLabel, ...) were not emitting
theSIG_ITEM_MOVEDsignal when moved interactively (with the mouse) if the item
anchor was attached to the canvas - Colormap: fixed context menu entry update (colormap icon was updated as expected, but
the colormap name was not) - Rotate/crop dialog: added missing toolbar on plot widget
- Flip/rotate dialog: added missing toolbar on plot widget
- Fixed issue with oblique averaged cross section computation (
AttributeErrorwhen
clicking on the empty cross section plot)
Version 2.3.0
In this release, test coverage is 75%.
💥 New features:
- Added support for colormap inversion:
- The user can now invert the colormap of an image item:
- From the image parameters dialog ("Invert colormap" checkbox)
- From the plot context menu (right-click on the image item)
BaseImageItem.set_color_mapmethod takes a newinvertparameter (which
defaults toNone, meaning that the behavior is unchanged)- New
ReverseColormapTool: registered by default in the plot widget, like the
ColormapTool(add the "Invert colormap" entry in the context menu of the image)
- The user can now invert the colormap of an image item:
🛠️ Bug fixes:
ErrorBarCurveItem: fixed NumPy deprecation warning
("Conversion of an array with ndim > 0 to a scalar is deprecated [...]")
ℹ️ Other changes:
- Image plot items deserialization:
- When an image plot item is deserialized, and needs to be reloaded from a file,
the file path is adapted to the current working directory if file is not found
(this is the legacy behavior). - An unnecessary call to
ImageIOHandler.adapt_pathmethod was removed from the
RawImageItem.deserializemethod: this issue has to be handled by the host
application, not by the PlotPy library. ImageIOHandler: removedadd_change_pathandadapt_pathmethods
- When an image plot item is deserialized, and needs to be reloaded from a file,
- Fix typo in
tests.features.test_colormap_editormodule: renamed function
test_colormap_managertotest_colormap_editor - Removed unnecessary
BaseImageItem.get_color_map_namemethod
v2.3.0
In this release, test coverage is 75%.
💥 New features:
- Added support for colormap inversion:
- The user can now invert the colormap of an image item:
- From the image parameters dialog ("Invert colormap" checkbox)
- From the plot context menu (right-click on the image item)
BaseImageItem.set_color_mapmethod takes a newinvertparameter (which
defaults toNone, meaning that the behavior is unchanged)- New
ReverseColormapTool: registered by default in the plot widget, like the
ColormapTool(add the "Invert colormap" entry in the context menu of the image)
- The user can now invert the colormap of an image item:
🛠️ Bug fixes:
ErrorBarCurveItem: fixed NumPy deprecation warning
("Conversion of an array with ndim > 0 to a scalar is deprecated [...]")
ℹ️ Other changes:
- Image plot items deserialization:
- When an image plot item is deserialized, and needs to be reloaded from a file,
the file path is adapted to the current working directory if file is not found
(this is the legacy behavior). - An unnecessary call to
ImageIOHandler.adapt_pathmethod was removed from the
RawImageItem.deserializemethod: this issue has to be handled by the host
application, not by the PlotPy library. ImageIOHandler: removedadd_change_pathandadapt_pathmethods
- When an image plot item is deserialized, and needs to be reloaded from a file,
- Fix typo in
tests.features.test_colormap_editormodule: renamed function
test_colormap_managertotest_colormap_editor - Removed unnecessary
BaseImageItem.get_color_map_namemethod