Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e300707

Browse files
committed
doc
1 parent 4a78246 commit e300707

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3480,6 +3480,15 @@ def remove_toolitem(self, name):
34803480

34813481

34823482
class FlowBase(object):
3483+
"""
3484+
Base mixin class for all GUI elements that can flow, aka laid out in
3485+
different directions.
3486+
3487+
The MPL window class deals with the manipulation of this mixin, so users
3488+
don't actually need to interact with this class.
3489+
3490+
Classes the implement this class must override the _update_flow method.
3491+
"""
34833492
flow_types = ['horizontal', 'vertical']
34843493

34853494
def __init__(self, flow='horizontal', flow_locked=False, **kwargs):
@@ -3489,6 +3498,9 @@ def __init__(self, flow='horizontal', flow_locked=False, **kwargs):
34893498

34903499
@property
34913500
def flow(self):
3501+
"""
3502+
The direction of flow, one of the strings in `flow_type`.
3503+
"""
34923504
return FlowBase.flow_types[self._flow]
34933505

34943506
@flow.setter
@@ -3504,6 +3516,11 @@ def flow(self, flow):
35043516
self._update_flow()
35053517

35063518
def _update_flow(self):
3519+
"""
3520+
Classes that extend FlowBase must override this method.
3521+
You can use the internal property self._flow whereby
3522+
flow_types[self._flow] gives the current flow.
3523+
"""
35073524
raise NotImplementedError
35083525

35093526

lib/matplotlib/backend_managers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class FigureManager(cbook.EventEmitter):
6464
figure : `matplotlib.figure.Figure`
6565
The figure that holds the canvas
6666
67-
toolbar : `matplotlib.backend_bases.NavigationToolbar2`
67+
toolbar : `matplotlib.backend_bases.ToolbarBase`
6868
The toolbar used for interacting with the figure.
6969
7070
window : `matplotlib.backend_bases.WindowBase`

0 commit comments

Comments
 (0)