Skip to content

spectral/graphics/spypylab.py uses outdated version of RectangleSelector from matplotlib.widgets #154

Closed
@losif63

Description

@losif63

In spectral/graphics/spypylab.py, from lines 781 ~ 796:

        try:
            from matplotlib.widgets import RectangleSelector
            self.selector = RectangleSelector(self.axes,
                                              self._select_rectangle,
                                              button=1,
                                              useblit=True,
                                              spancoords='data',
                                              drawtype='box',
                                              rectprops = \
                                                  self.selector_rectprops)
            self.selector.set_active(False)
        except:
            self.selector = None
            msg = 'Failed to create RectangleSelector object. Interactive ' \
              'pixel class labeling will be unavailable.'
            warnings.warn(msg)

Apparently, the parameters "drawtype" and "rectprops" in the RectangleSelector constructor are deprecated in matplotlib version 3.5, while the latest matplotlib version is 3.7.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions