Skip to content

Commit

Permalink
remove all other references to axmanager
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Jan 19, 2021
1 parent 38467ea commit ba69342
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/mpl_qt_viz/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
2 changes: 1 addition & 1 deletion src/mpl_qt_viz/roiSelection/_coreClasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down
2 changes: 1 addition & 1 deletion src/mpl_qt_viz/roiSelection/_creatorWidgets/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""

Expand Down
2 changes: 1 addition & 1 deletion src/mpl_qt_viz/roiSelection/_modifierWidgets/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""

Expand Down
5 changes: 2 additions & 3 deletions src/mpl_qt_viz/visualizers/_PlotNd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ba69342

Please sign in to comment.