Skip to content

Releases: PlotPyStack/PlotPy

v2.8.2

12 Nov 15:47

Choose a tag to compare

Version 2.8.2

🛠️ Bug fixes:

  • Fixed RuntimeWarning when changing masked image data type from float to integer:
    • MaskedImageItem.update_mask() now handles NaN and None filling_value gracefully
    • When converting to integer dtypes, NaN/None values are replaced with 0 instead of triggering numpy cast warnings
    • When converting to float dtypes, NaN is preserved as the fill value
    • Added comprehensive tests to validate dtype conversion scenarios

Version 2.8.1

🛠️ Bug fixes:

  • Issue #50 - Fixed ImageStatsTool displaying "No available data" for XYImageItem and MaskedXYImageItem:
    • Added IExportROIImageItemType to XYImageItem.types() so that get_items_in_rectangle() can properly identify XY image items
    • Updated __implements__ tuples for consistency across XYImageItem, MaskedXYImageItem, and MaskedImageItem
    • The tool now correctly displays statistics for images with non-uniform coordinates
  • Fixed snapshot tool failing with SystemError on XYImageItem and MaskedXYImageItem:
    • Fixed assemble_imageitems passing list instead of tuple to C extension function _scale_rect
    • Added missing export_roi method to XYImageItem to properly handle non-uniform coordinate transformations
    • Snapshots of XY images now render correctly instead of producing black images

Version 2.8.0

💥 New features / Enhancements:

  • Curve fitting: added support for locked parameters:
    • New locked parameter in FitParam class to lock parameter values during automatic optimization
    • New locked field in FitParamDataSet to configure parameter locking via the settings dialog
    • When locked, parameters retain their manually-adjusted values during auto-fit
    • Visual indicators: locked parameters show a 🔒 emoji and are grayed out with disabled controls
    • All optimization algorithms (simplex, Powell, BFGS, L-BFGS-B, conjugate gradient, least squares) fully support locked parameters
    • Enables partial optimization workflows: fix well-determined parameters, optimize uncertain ones
    • Improves fit convergence by reducing problem dimensionality
  • Configurable autoscale margin:
    • Added autoscale_margin_percent parameter to BasePlotOptions for intuitive percentage-based margin control
    • Users can now specify autoscale margins as percentages (e.g., 0.2 for 0.2%, 5.0 for 5%)
    • Replaces the previous decimal-based approach with more user-friendly percentage values
    • Default remains 0.2% (equivalent to previous 0.002) for backward compatibility
    • Includes validation to prevent unreasonable values (0-50% range)
  • Image statistics tool improvements:
    • Enhanced get_stats function to display delta (Δ) values for coordinate ranges
    • Now shows Δx, Δy, and Δz values alongside the min/max ranges for better analysis
  • Added optional "Axes" tab control in Parameters dialog:
    • New show_axes_tab option in BasePlotOptions and PlotOptions (default: True)
    • When set to False, the "Axes" tab is hidden from item parameter dialogs
    • This allows applications to provide their own axes management while using PlotPy
    • Can be configured during plot creation or changed at runtime using plot.set_show_axes_tab(False)
  • Issue #45 - Add support for new curve Y-range cursor tool YRangeCursorTool:
    • This tool is similar to the existing CurveStatsTool, but it simply shows the Y-range values (min, max and interval).
    • It can be added to the plot widget using plot_widget.manager.add_tool(YRangeCursorTool)
  • Update color configurations defaults for improved visibility
  • Item list:
    • Added a new "Rename" context menu entry to rename the selected item
    • This entry is only available for editable items
  • X and Y range selection items:
    • Added support for item title in parameters data set (RangeShapeParam)
    • This concerns the XRangeSelection and YRangeSelection items
  • New annotated X and Y range selection items:
    • Added AnnotatedXRange and AnnotatedYRange items
    • These items provide X and Y range selection with an annotation label
    • They can be created using make.annotated_xrange and make.annotated_yrange functions
  • New SyncPlotDialog class:
    • This class provides a dialog for displaying synchronized plots.
    • This is a complementary class to SyncPlotWindow, providing a modal dialog interface for synchronized plotting.
  • Native datetime axis support:
    • Added BasePlot.set_axis_datetime() method to easily configure an axis for datetime display
    • Added BasePlot.set_axis_limits_from_datetime() method to set axis limits using datetime objects directly
    • Supports customizable datetime format strings using Python's strftime format codes
    • Configurable label rotation and spacing for optimal display
    • Example: plot.set_axis_datetime("bottom", format="%H:%M:%S") for time-only display
    • Example: plot.set_axis_limits_from_datetime("bottom", dt1, dt2) to zoom to a specific time range
    • Added "datetime" as a valid scale type (alongside "lin" and "log") for axis configuration
    • Added datetime coordinate formatting support throughout PlotPy:
      • Cursor tools (VCursorTool, HCursorTool, XCursorTool) now display datetime-formatted X/Y coordinates
      • CurveStatsTool now displays datetime-formatted X coordinates for statistical computations
      • Marker labels automatically format coordinates as datetime when axis uses datetime scale
      • Coordinate display in the plot canvas now shows datetime format when appropriate
      • Refactored ObjectInfo base class to provide shared datetime formatting methods for code reuse

🧹 API cleanup: removed deprecated update methods (use update_item instead)

  • Removed AnnotationParam.update_annotation method
  • Removed AxesShapeParam.update_axes method
  • Removed AxesParam.update_axes method
  • Removed ImageAxesParam.update_axes method
  • Removed LabelParam.update_label method
  • Removed MarkerParam.update_marker method
  • Removed RangeShapeParam.update_range method
  • Removed ShapeParam.update_shape method

🛠️ Bug fixes:

  • Fixed RuntimeError in SyncPlotWindow and SyncPlotDialog when closing widgets quickly:
    • Fixed "wrapped C/C++ object of type QwtScaleWidget has been deleted" error that occurred when widgets were closed before the deferred plot rescaling operation could complete
    • Replaced QTimer.singleShot() with controllable QTimer instances that can be stopped on widget close
    • Added handle_show_event() and handle_close_event() methods to BaseSyncPlot for proper timer lifecycle management
    • Refactored showEvent() and closeEvent() in both SyncPlotWindow and SyncPlotDialog to eliminate code duplication
    • Added early exit check in rescale_plots() to prevent execution if the timer has been stopped
    • This fix ensures clean widget shutdown and prevents Qt from attempting to access deleted C++ objects
  • Cross-section panels: Fixed autoscaling logic in BaseCrossSectionPlot
    • Streamlined handling of autoscale_mode and lockscales options for consistent scaling behavior across all code paths
    • The update_plot() method now delegates all scaling logic to plot_axis_changed() to avoid code duplication and ensure consistency
    • Fixed issue where Y cross-section plots for rectangular images with non-uniform axes (e.g., Y = f(X)) were not properly scaled on initial display
    • The lockscales mode now correctly syncs the cross-section axis (CS_AXIS) to the image plot while autoscaling the intensity axis (Z_AXIS)
  • Issue #49 - Fixed multiple coordinate handling bugs in XYImageItem:
    • Root cause: XYImageItem internally stores bin edges (length n+1) but several methods were incorrectly treating them as pixel centers (length n)
    • Fixed get_x_values() and get_y_values() to correctly compute and return pixel centers from stored bin edges: (edge[i] + edge[i+1]) / 2
    • Fixed get_pixel_coordinates() to correctly convert plot coordinates to pixel indices using searchsorted() with proper edge-to-index adjustment
    • Fixed get_plot_coordinates() to return pixel center coordinates instead of bin edge coordinates
    • Fixed get_closest_coordinates() to return pixel center coordinates instead of bin edge coordinates
    • Added comprehensive docstring documentation explaining that XYImageItem.x and XYImageItem.y store bin edges, not pixel centers
    • Removed redundant pixel centering code in CrossSectionItem.update_curve_data() that was working around these bugs
    • This fixes the reported issue where using cross-section tools progressively translated image data to the bottom-right corner
    • All coordinate-related methods now properly handle the bin edge vs pixel center distinction throughout the XYImageItem API
  • Fixed index bounds calculation for image slicing compatibility:
    • Corrected the calculation of maximum indices in get_plot_coordinates to ensure proper bounds when using NumPy array slicing
    • Previously, the maximum indices were off by one, which could cause issues when extracting image data using the returned coordinates
    • Now returns indices that correctly align with Python/NumPy slicing conventions (e.g., [i1:i2+1, j1:j2+1])
    • This fixes an historic bug that could lead to off-by-one errors when users extracted image data using the coordinates provided by this function
  • Fixed plot update after inserting a point using the EditPointTool on non-Windows platforms
  • Issue #46 - Contrast adjustment with 'Eliminate outliers' failed for float images with high dynamic range
  • Issue #29 - SelectTool: Selectin...
Read more

v2.8.1

06 Nov 08:01

Choose a tag to compare

Version 2.8.1

🛠️ Bug fixes:

  • Issue #50 - Fixed ImageStatsTool displaying "No available data" for XYImageItem and MaskedXYImageItem:
    • Added IExportROIImageItemType to XYImageItem.types() so that get_items_in_rectangle() can properly identify XY image items
    • Updated __implements__ tuples for consistency across XYImageItem, MaskedXYImageItem, and MaskedImageItem
    • The tool now correctly displays statistics for images with non-uniform coordinates
  • Fixed snapshot tool failing with SystemError on XYImageItem and MaskedXYImageItem:
    • Fixed assemble_imageitems passing list instead of tuple to C extension function _scale_rect
    • Added missing export_roi method to XYImageItem to properly handle non-uniform coordinate transformations
    • Snapshots of XY images now render correctly instead of producing black images

Version 2.8.0

💥 New features / Enhancements:

  • Curve fitting: added support for locked parameters:
    • New locked parameter in FitParam class to lock parameter values during automatic optimization
    • New locked field in FitParamDataSet to configure parameter locking via the settings dialog
    • When locked, parameters retain their manually-adjusted values during auto-fit
    • Visual indicators: locked parameters show a 🔒 emoji and are grayed out with disabled controls
    • All optimization algorithms (simplex, Powell, BFGS, L-BFGS-B, conjugate gradient, least squares) fully support locked parameters
    • Enables partial optimization workflows: fix well-determined parameters, optimize uncertain ones
    • Improves fit convergence by reducing problem dimensionality
  • Configurable autoscale margin:
    • Added autoscale_margin_percent parameter to BasePlotOptions for intuitive percentage-based margin control
    • Users can now specify autoscale margins as percentages (e.g., 0.2 for 0.2%, 5.0 for 5%)
    • Replaces the previous decimal-based approach with more user-friendly percentage values
    • Default remains 0.2% (equivalent to previous 0.002) for backward compatibility
    • Includes validation to prevent unreasonable values (0-50% range)
  • Image statistics tool improvements:
    • Enhanced get_stats function to display delta (Δ) values for coordinate ranges
    • Now shows Δx, Δy, and Δz values alongside the min/max ranges for better analysis
  • Added optional "Axes" tab control in Parameters dialog:
    • New show_axes_tab option in BasePlotOptions and PlotOptions (default: True)
    • When set to False, the "Axes" tab is hidden from item parameter dialogs
    • This allows applications to provide their own axes management while using PlotPy
    • Can be configured during plot creation or changed at runtime using plot.set_show_axes_tab(False)
  • Issue #45 - Add support for new curve Y-range cursor tool YRangeCursorTool:
    • This tool is similar to the existing CurveStatsTool, but it simply shows the Y-range values (min, max and interval).
    • It can be added to the plot widget using plot_widget.manager.add_tool(YRangeCursorTool)
  • Update color configurations defaults for improved visibility
  • Item list:
    • Added a new "Rename" context menu entry to rename the selected item
    • This entry is only available for editable items
  • X and Y range selection items:
    • Added support for item title in parameters data set (RangeShapeParam)
    • This concerns the XRangeSelection and YRangeSelection items
  • New annotated X and Y range selection items:
    • Added AnnotatedXRange and AnnotatedYRange items
    • These items provide X and Y range selection with an annotation label
    • They can be created using make.annotated_xrange and make.annotated_yrange functions
  • New SyncPlotDialog class:
    • This class provides a dialog for displaying synchronized plots.
    • This is a complementary class to SyncPlotWindow, providing a modal dialog interface for synchronized plotting.
  • Native datetime axis support:
    • Added BasePlot.set_axis_datetime() method to easily configure an axis for datetime display
    • Added BasePlot.set_axis_limits_from_datetime() method to set axis limits using datetime objects directly
    • Supports customizable datetime format strings using Python's strftime format codes
    • Configurable label rotation and spacing for optimal display
    • Example: plot.set_axis_datetime("bottom", format="%H:%M:%S") for time-only display
    • Example: plot.set_axis_limits_from_datetime("bottom", dt1, dt2) to zoom to a specific time range
    • Added "datetime" as a valid scale type (alongside "lin" and "log") for axis configuration
    • Added datetime coordinate formatting support throughout PlotPy:
      • Cursor tools (VCursorTool, HCursorTool, XCursorTool) now display datetime-formatted X/Y coordinates
      • CurveStatsTool now displays datetime-formatted X coordinates for statistical computations
      • Marker labels automatically format coordinates as datetime when axis uses datetime scale
      • Coordinate display in the plot canvas now shows datetime format when appropriate
      • Refactored ObjectInfo base class to provide shared datetime formatting methods for code reuse

🧹 API cleanup: removed deprecated update methods (use update_item instead)

  • Removed AnnotationParam.update_annotation method
  • Removed AxesShapeParam.update_axes method
  • Removed AxesParam.update_axes method
  • Removed ImageAxesParam.update_axes method
  • Removed LabelParam.update_label method
  • Removed MarkerParam.update_marker method
  • Removed RangeShapeParam.update_range method
  • Removed ShapeParam.update_shape method

🛠️ Bug fixes:

  • Fixed RuntimeError in SyncPlotWindow and SyncPlotDialog when closing widgets quickly:
    • Fixed "wrapped C/C++ object of type QwtScaleWidget has been deleted" error that occurred when widgets were closed before the deferred plot rescaling operation could complete
    • Replaced QTimer.singleShot() with controllable QTimer instances that can be stopped on widget close
    • Added handle_show_event() and handle_close_event() methods to BaseSyncPlot for proper timer lifecycle management
    • Refactored showEvent() and closeEvent() in both SyncPlotWindow and SyncPlotDialog to eliminate code duplication
    • Added early exit check in rescale_plots() to prevent execution if the timer has been stopped
    • This fix ensures clean widget shutdown and prevents Qt from attempting to access deleted C++ objects
  • Cross-section panels: Fixed autoscaling logic in BaseCrossSectionPlot
    • Streamlined handling of autoscale_mode and lockscales options for consistent scaling behavior across all code paths
    • The update_plot() method now delegates all scaling logic to plot_axis_changed() to avoid code duplication and ensure consistency
    • Fixed issue where Y cross-section plots for rectangular images with non-uniform axes (e.g., Y = f(X)) were not properly scaled on initial display
    • The lockscales mode now correctly syncs the cross-section axis (CS_AXIS) to the image plot while autoscaling the intensity axis (Z_AXIS)
  • Issue #49 - Fixed multiple coordinate handling bugs in XYImageItem:
    • Root cause: XYImageItem internally stores bin edges (length n+1) but several methods were incorrectly treating them as pixel centers (length n)
    • Fixed get_x_values() and get_y_values() to correctly compute and return pixel centers from stored bin edges: (edge[i] + edge[i+1]) / 2
    • Fixed get_pixel_coordinates() to correctly convert plot coordinates to pixel indices using searchsorted() with proper edge-to-index adjustment
    • Fixed get_plot_coordinates() to return pixel center coordinates instead of bin edge coordinates
    • Fixed get_closest_coordinates() to return pixel center coordinates instead of bin edge coordinates
    • Added comprehensive docstring documentation explaining that XYImageItem.x and XYImageItem.y store bin edges, not pixel centers
    • Removed redundant pixel centering code in CrossSectionItem.update_curve_data() that was working around these bugs
    • This fixes the reported issue where using cross-section tools progressively translated image data to the bottom-right corner
    • All coordinate-related methods now properly handle the bin edge vs pixel center distinction throughout the XYImageItem API
  • Fixed index bounds calculation for image slicing compatibility:
    • Corrected the calculation of maximum indices in get_plot_coordinates to ensure proper bounds when using NumPy array slicing
    • Previously, the maximum indices were off by one, which could cause issues when extracting image data using the returned coordinates
    • Now returns indices that correctly align with Python/NumPy slicing conventions (e.g., [i1:i2+1, j1:j2+1])
    • This fixes an historic bug that could lead to off-by-one errors when users extracted image data using the coordinates provided by this function
  • Fixed plot update after inserting a point using the EditPointTool on non-Windows platforms
  • Issue #46 - Contrast adjustment with 'Eliminate outliers' failed for float images with high dynamic range
  • Issue #29 - SelectTool: Selecting Another Shape Without Unselection
    • Fixed direct selection between different shapes without requiring intermediate click on empty space
    • Users can now click directly from one shape to another for immediate selection
    • Maintains all existing functionality including multi-selection (Ctrl+click), moving, and resizing
  • Fixed ErrorBarCurveItem handling of all-NaN data:
    • Fixed ValueError: zero-size array to reduction operation minimum which has no identity w...
Read more

v2.8.0

24 Oct 14:34
Immutable release. Only release title and notes can be modified.

Choose a tag to compare

💥 New features / Enhancements:

  • Curve fitting: added support for locked parameters:
    • New locked parameter in FitParam class to lock parameter values during automatic optimization
    • New locked field in FitParamDataSet to configure parameter locking via the settings dialog
    • When locked, parameters retain their manually-adjusted values during auto-fit
    • Visual indicators: locked parameters show a 🔒 emoji and are grayed out with disabled controls
    • All optimization algorithms (simplex, Powell, BFGS, L-BFGS-B, conjugate gradient, least squares) fully support locked parameters
    • Enables partial optimization workflows: fix well-determined parameters, optimize uncertain ones
    • Improves fit convergence by reducing problem dimensionality
  • Configurable autoscale margin:
    • Added autoscale_margin_percent parameter to BasePlotOptions for intuitive percentage-based margin control
    • Users can now specify autoscale margins as percentages (e.g., 0.2 for 0.2%, 5.0 for 5%)
    • Replaces the previous decimal-based approach with more user-friendly percentage values
    • Default remains 0.2% (equivalent to previous 0.002) for backward compatibility
    • Includes validation to prevent unreasonable values (0-50% range)
  • Image statistics tool improvements:
    • Enhanced get_stats function to display delta (Δ) values for coordinate ranges
    • Now shows Δx, Δy, and Δz values alongside the min/max ranges for better analysis
  • Added optional "Axes" tab control in Parameters dialog:
    • New show_axes_tab option in BasePlotOptions and PlotOptions (default: True)
    • When set to False, the "Axes" tab is hidden from item parameter dialogs
    • This allows applications to provide their own axes management while using PlotPy
    • Can be configured during plot creation or changed at runtime using plot.set_show_axes_tab(False)
  • Issue #45 - Add support for new curve Y-range cursor tool YRangeCursorTool:
    • This tool is similar to the existing CurveStatsTool, but it simply shows the Y-range values (min, max and interval).
    • It can be added to the plot widget using plot_widget.manager.add_tool(YRangeCursorTool)
  • Update color configurations defaults for improved visibility
  • Item list:
    • Added a new "Rename" context menu entry to rename the selected item
    • This entry is only available for editable items
  • X and Y range selection items:
    • Added support for item title in parameters data set (RangeShapeParam)
    • This concerns the XRangeSelection and YRangeSelection items
  • New annotated X and Y range selection items:
    • Added AnnotatedXRange and AnnotatedYRange items
    • These items provide X and Y range selection with an annotation label
    • They can be created using make.annotated_xrange and make.annotated_yrange functions
  • New SyncPlotDialog class:
    • This class provides a dialog for displaying synchronized plots.
    • This is a complementary class to SyncPlotWindow, providing a modal dialog interface for synchronized plotting.
  • Native datetime axis support:
    • Added BasePlot.set_axis_datetime() method to easily configure an axis for datetime display
    • Added BasePlot.set_axis_limits_from_datetime() method to set axis limits using datetime objects directly
    • Supports customizable datetime format strings using Python's strftime format codes
    • Configurable label rotation and spacing for optimal display
    • Example: plot.set_axis_datetime("bottom", format="%H:%M:%S") for time-only display
    • Example: plot.set_axis_limits_from_datetime("bottom", dt1, dt2) to zoom to a specific time range
    • Added "datetime" as a valid scale type (alongside "lin" and "log") for axis configuration
    • Added datetime coordinate formatting support throughout PlotPy:
      • Cursor tools (VCursorTool, HCursorTool, XCursorTool) now display datetime-formatted X/Y coordinates
      • CurveStatsTool now displays datetime-formatted X coordinates for statistical computations
      • Marker labels automatically format coordinates as datetime when axis uses datetime scale
      • Coordinate display in the plot canvas now shows datetime format when appropriate
      • Refactored ObjectInfo base class to provide shared datetime formatting methods for code reuse

🧹 API cleanup: removed deprecated update methods (use update_item instead)

  • Removed AnnotationParam.update_annotation method
  • Removed AxesShapeParam.update_axes method
  • Removed AxesParam.update_axes method
  • Removed ImageAxesParam.update_axes method
  • Removed LabelParam.update_label method
  • Removed MarkerParam.update_marker method
  • Removed RangeShapeParam.update_range method
  • Removed ShapeParam.update_shape method

🛠️ Bug fixes:

  • Fixed RuntimeError in SyncPlotWindow and SyncPlotDialog when closing widgets quickly:
    • Fixed "wrapped C/C++ object of type QwtScaleWidget has been deleted" error that occurred when widgets were closed before the deferred plot rescaling operation could complete
    • Replaced QTimer.singleShot() with controllable QTimer instances that can be stopped on widget close
    • Added handle_show_event() and handle_close_event() methods to BaseSyncPlot for proper timer lifecycle management
    • Refactored showEvent() and closeEvent() in both SyncPlotWindow and SyncPlotDialog to eliminate code duplication
    • Added early exit check in rescale_plots() to prevent execution if the timer has been stopped
    • This fix ensures clean widget shutdown and prevents Qt from attempting to access deleted C++ objects
  • Cross-section panels: Fixed autoscaling logic in BaseCrossSectionPlot
    • Streamlined handling of autoscale_mode and lockscales options for consistent scaling behavior across all code paths
    • The update_plot() method now delegates all scaling logic to plot_axis_changed() to avoid code duplication and ensure consistency
    • Fixed issue where Y cross-section plots for rectangular images with non-uniform axes (e.g., Y = f(X)) were not properly scaled on initial display
    • The lockscales mode now correctly syncs the cross-section axis (CS_AXIS) to the image plot while autoscaling the intensity axis (Z_AXIS)
  • Issue #49 - Fixed multiple coordinate handling bugs in XYImageItem:
    • Root cause: XYImageItem internally stores bin edges (length n+1) but several methods were incorrectly treating them as pixel centers (length n)
    • Fixed get_x_values() and get_y_values() to correctly compute and return pixel centers from stored bin edges: (edge[i] + edge[i+1]) / 2
    • Fixed get_pixel_coordinates() to correctly convert plot coordinates to pixel indices using searchsorted() with proper edge-to-index adjustment
    • Fixed get_plot_coordinates() to return pixel center coordinates instead of bin edge coordinates
    • Fixed get_closest_coordinates() to return pixel center coordinates instead of bin edge coordinates
    • Added comprehensive docstring documentation explaining that XYImageItem.x and XYImageItem.y store bin edges, not pixel centers
    • Removed redundant pixel centering code in CrossSectionItem.update_curve_data() that was working around these bugs
    • This fixes the reported issue where using cross-section tools progressively translated image data to the bottom-right corner
    • All coordinate-related methods now properly handle the bin edge vs pixel center distinction throughout the XYImageItem API
  • Fixed index bounds calculation for image slicing compatibility:
    • Corrected the calculation of maximum indices in get_plot_coordinates to ensure proper bounds when using NumPy array slicing
    • Previously, the maximum indices were off by one, which could cause issues when extracting image data using the returned coordinates
    • Now returns indices that correctly align with Python/NumPy slicing conventions (e.g., [i1:i2+1, j1:j2+1])
    • This fixes an historic bug that could lead to off-by-one errors when users extracted image data using the coordinates provided by this function
  • Fixed plot update after inserting a point using the EditPointTool on non-Windows platforms
  • Issue #46 - Contrast adjustment with 'Eliminate outliers' failed for float images with high dynamic range
  • Issue #29 - SelectTool: Selecting Another Shape Without Unselection
    • Fixed direct selection between different shapes without requiring intermediate click on empty space
    • Users can now click directly from one shape to another for immediate selection
    • Maintains all existing functionality including multi-selection (Ctrl+click), moving, and resizing
  • Fixed ErrorBarCurveItem handling of all-NaN data:
    • Fixed ValueError: zero-size array to reduction operation minimum which has no identity when error bar curves contain only NaN values
    • Added proper checks in boundingRect() and draw() methods to handle empty arrays gracefully
    • Error bar curves with all-NaN data now fall back to parent class behavior instead of crashing
  • Item list: refresh tree when item parameters are changed:
    • Added SIG_ITEM_PARAMETERS_CHANGED signal to BasePlot class
    • This signal is emitted when the parameters of an item are changed using the parameters dialog, or a specific tool (e.g. the colormap selection tool, or the lock/unlock tool for image items)
    • The signal is emitted with the item as argument
    • The ItemListWidget now listens to this signal and refreshes the item list accordingly
  • Edit tools (Edit data, center image position):
    • Exclude read-only items from the list of editable items
    • It is no longer possible to use those tools on read-only items
  • Marker items (markers, cursors):
    • Setting item movable s...
Read more

v2.7.5

15 Jul 13:27

Choose a tag to compare

Version 2.7.5

🛠️ Bug fixes:

  • Issue #44 - Incorrect calculation method for "∑(y)" in CurveStatsTool: replaced spt.trapezoid with np.sum, which is more consistent with the summation operation
  • Fix update_status method in all cross-section tools (intensity profile tools):
    • Use get_items instead of get_selected_items to retrieve the image items
    • This allows the tools to work properly when no image item is selected, but there are image items in the plot
    • This closes Issue #47 - Intensity profile tools do not work when no image item is selected

Other changes:

  • Updated guidata dependency to V3.10.0
  • Using new guidata translation utility based on babel

v2.7.4

26 Apr 07:29

Choose a tag to compare

In this release, test coverage is 80%.

🛠️ Bug fixes:

  • Issue #42 - Image profiles: when moving/resizing image, profile plots are not refreshed
  • Issue #41 - Average profile visualization: empty profile is displayed when the target rectangular area is outside the image area

v2.7.3

05 Apr 10:45

Choose a tag to compare

In this release, test coverage is 80%.

🛠️ Bug fixes:

  • Issue #40 - Z-axis logarithmic scale (ZAxisLogTool tool) is not compatible with anti-aliasing interpolation
  • Fix intersection check for destination rectangle in XYImageFilterItem
  • Issue #36 - Image items are not properly scaling along Y-axis with logarithmic scale:
    • Actually, image items do not support non-linear scales (this is an historical limitation)
    • This is not documented at all, so we've added an explicit warning: a red colored message is displayed at the center of the image frame when any non-linear scale is applied to either X or Y axis
    • When dealing with non-linear scales, PlotPy provides an alternative solution: the user may rely on XYImageItem (e.g. by using make.xyimage) as this item supports arbitrary X and Y pixel coordinates
  • Issue #34 - ValueError when trying to plot 2D histogram items with PyQt6

Other changes:

  • Replace deprecated icon files with new SVG icons for selection tools

v2.7.2

14 Feb 14:35

Choose a tag to compare

Version 2.7.2

🛠️ Bug fixes:

  • Issue #32 - Plot item list panel's parameters dialog box is empty for non-selectable items
  • Issue #30 - handle_final_shape_cb argument doesn't work on MultilineTool, PolygonTool, AnnotatedPolygonTool

v2.7.1

22 Jan 14:02

Choose a tag to compare

Version 2.7.1

🛠️ Bug fixes:

  • Fixed update canvasRect type to QRectF for intersection checks in CircleSVGShape, following this bug fix in PythonQwt V0.14.4
  • Fixed regression with respect to guiqwt regarding plot items instantiation:
    • guiqwt was allowing to instantiate plot items without needing to create a QApplication instance (no GUI event loop was required)
    • This was not the case with plotpy, so that it was not possible -for example- to serialize/deserialize plot items to JSON without creating a QApplication instance
    • This has been fixed by removing the QIcon instantiation from the plot items constructors (call to QwtPlotItem.setIcon method). Note that -in the meantime- QwtPlotItem.setIcon and QwtPlotItem.icon methods have also been removed in PythonQwt V0.14.3. Code relying on this feature should thus be updated to use the new get_icon_name method instead, i.e. get_icon(item.get_icon_name()) instead of item.icon().
  • Issue #26 - Item list panel should not allow to select a non-selectable item

v2.7.0

07 Nov 11:11

Choose a tag to compare

Version 2.7.0

Supported versions of Python have been updated (drop support for Python 3.8, add support for Python 3.13):

  • PlotPy < 2.7.0: Python 3.8, 3.9, 3.10, 3.11 and 3.12
  • PlotPy >= 2.7.0: Python 3.9, 3.10, 3.11, 3.12 and 3.13

Other dependencies have been updated:

  • Updated versions to those available at the time of the release of the oldest supported Python version (3.9)
  • Exception: Cython 3.0 is required for Python 3.13

💥 New features / Enhancements:

  • Added AnnotatedPolygon annotation to items
  • Added make.annotated_polygon function to plotpy.builder module
  • Customization of annotation information:
    • Added info_callback argument to all annotation class constructors
    • Added set_info_callback method to all annotation classes
    • The info_callback is a function that takes the annotation object and returns a string with the information to display
    • Default info_callback is redirected to the get_infos method of the annotation object (this makes the feature backward compatible)

🛠️ Bug fixes:

  • Fixed pydicom support: use dcmread instead of read_file to read DICOM files

v2.6.3

01 Oct 15:51

Choose a tag to compare

⚡ Ready-to-use packages for all platforms are available on PyPI

🧯 In this release, test coverage is 79%.

🛠️ Bug fixes:

  • Issue #25 - OverflowError with Contrast Adjustment panel for constant images
  • When updating image parameters (ImageParam) from the associated item object:
    • If xmin, xmax, ymin, ymax attributes are not yet set (i.e. None), do not update them with the image data bounds
    • Previous behavior was to update them with the image data bounds, which was leading to breaking the automatic bounds update when the image data is updated
  • Issue #24 - Colormap: side effect on image axes when changing the colormap
  • Issue #23 - Windows: Image _scaler engine performance regression
  • PySide6 compatibility issues:
    • Fixed deprecated call to QMouseEvent in tests/unit/utils.py
    • Added workaround for QPolygonF shape point slicing
  • Issue #21 - PySide6 on Linux: segfault in test_colormap_editor.py
  • Fixed sliderMoved signal connection in ColorMapEditor
  • Fixed AssertionError in test_rect_zoom.py (Linux, Python 3.12, PyQt6)
  • Fixed typing issues in plotpy.events module:
    • Event objects were not properly typed (QtCore.QEvent instead of QtGui.QMouseEvent)
    • Event position arguments were not properly typed (QtCore.QPoint instead of QtCore.QPointF)
  • Fix NumPy FutureWarning: Format strings passed to MaskedConstant are ignored [...] when displaying masked pixel coordinates