diff --git a/src/mpl_qt_viz/__main__.py b/src/mpl_qt_viz/__main__.py index 425d9f1..fb7d14a 100644 --- a/src/mpl_qt_viz/__main__.py +++ b/src/mpl_qt_viz/__main__.py @@ -25,9 +25,8 @@ ax2.imshow(data.mean(axis=2)) fig, ax = plt.subplots() - axMan = roi.AxManager(ax) im = ax.imshow(data.mean(axis=2)) - ellipse = roi.EllipseCreator(axMan, im) + ellipse = roi.EllipseCreator(ax, im) ellipse.set_active(True) sys.exit(app.exec()) \ No newline at end of file diff --git a/src/mpl_qt_viz/roiSelection/_coreClasses.py b/src/mpl_qt_viz/roiSelection/_coreClasses.py index 1fd4c06..8189eee 100644 --- a/src/mpl_qt_viz/roiSelection/_coreClasses.py +++ b/src/mpl_qt_viz/roiSelection/_coreClasses.py @@ -122,7 +122,7 @@ class InteractiveWidgetBase(AxesWidget): Attributes: state (set): A `set` that stores strings indicating the current state (Are we dragging the mouse, is the shift key pressed, etc. - artists (list): A `list` of matplotlib widgets managed by the selector. + artists (list): A `list` of matplotlib artists managed by the selector. ax: A reference to the matplotlib Axes that this selector is assigned to. image (AxesImage): A reference to the image being interacted with. Can be used to get the image data. """ diff --git a/src/mpl_qt_viz/roiSelection/_creatorWidgets/_base.py b/src/mpl_qt_viz/roiSelection/_creatorWidgets/_base.py index 6613161..48f69e0 100644 --- a/src/mpl_qt_viz/roiSelection/_creatorWidgets/_base.py +++ b/src/mpl_qt_viz/roiSelection/_creatorWidgets/_base.py @@ -21,7 +21,7 @@ class CreatorWidgetBase(InteractiveWidgetBase, metaclass=ABCMeta): Attributes: state (set): A `set` that stores strings indicating the current state (Are we dragging the mouse, is the shift key pressed, etc. - artists (list): A `list` of matplotlib widgets managed by the selector. + artists (list): A `list` of matplotlib artists managed by the selector. image (AxesImage): A reference to the image being interacted with. Can be used to get the image data. """ diff --git a/src/mpl_qt_viz/roiSelection/_modifierWidgets/_base.py b/src/mpl_qt_viz/roiSelection/_modifierWidgets/_base.py index 0f310c0..ce6b0c6 100644 --- a/src/mpl_qt_viz/roiSelection/_modifierWidgets/_base.py +++ b/src/mpl_qt_viz/roiSelection/_modifierWidgets/_base.py @@ -24,7 +24,7 @@ class ModifierWidgetBase(InteractiveWidgetBase, metaclass=ABCMeta): Attributes: state (set): A `set` that stores strings indicating the current state (Are we dragging the mouse, is the shift key pressed, etc. - artists (list): A `list` of matplotlib widgets managed by the selector. + artists (list): A `list` of matplotlib artists managed by the selector. image (AxesImage): A reference to the image being interacted with. Can be used to get the image data. """ diff --git a/src/mpl_qt_viz/visualizers/_PlotNd/__init__.py b/src/mpl_qt_viz/visualizers/_PlotNd/__init__.py index 2191cc4..9c39a5e 100644 --- a/src/mpl_qt_viz/visualizers/_PlotNd/__init__.py +++ b/src/mpl_qt_viz/visualizers/_PlotNd/__init__.py @@ -25,7 +25,7 @@ from matplotlib.backends.backend_qt5 import NavigationToolbar2QT, FigureCanvasQT import numpy as np -from mpl_qt_viz.roiSelection import LassoCreator, PointCreator, AdjustableSelector, AxManager +from mpl_qt_viz.roiSelection import LassoCreator, PointCreator, AdjustableSelector from ._canvas import PlotNdCanvas from .._sharedWidgets import AnimationDlg, QRangeSlider @@ -118,8 +118,7 @@ def __init__(self, data: np.ndarray, names: Tuple[str, ...] = None, self.slider.endValueChanged.connect(_) self._lastButton = None - self._axesManager = AxManager(self.canvas.image.ax) - self.selector = AdjustableSelector(self._axesManager, self.canvas.image.im, LassoCreator, + self.selector = AdjustableSelector(self.canvas.image.ax, self.canvas.image.im, LassoCreator, onfinished=self._selectorFinished) self.buttonWidget = QGroupBox("Control", self)