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

Skip to content

Commit 3703788

Browse files
committed
document use_blit
1 parent 4d3f7eb commit 3703788

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

doc/api/animation_api.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ To save an animation to disk use `Animation.save` or `Animation.to_html5_video`
3636
See :ref:`ani_writer_classes` below for details about what movie formats are
3737
supported.
3838

39+
40+
.. _func-animation:
41+
3942
``FuncAnimation``
4043
-----------------
4144

lib/matplotlib/legend.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ def __init__(self, legend, use_blit=False, update="loc"):
5959
legend : `.Legend`
6060
The `.Legend` instance to wrap.
6161
use_blit : bool, optional
62-
63-
update : ['loc' | 'bbox'], optional
62+
Use blitting for faster image composition. For details see
63+
:ref:`func-animation`.
64+
update : {'loc', 'bbox'}, optional
6465
If "loc", update the *loc* parameter of the legend upon finalizing.
6566
If "bbox", update the *bbox_to_anchor* parameter.
6667
"""
@@ -1111,8 +1112,9 @@ def set_draggable(self, state, use_blit=False, update='loc'):
11111112
state : bool
11121113
``True`` / ``False`` enables / disables mouse dragging.
11131114
use_blit : bool, optional
1114-
1115-
update_loc : ['loc' | 'bbox'], optional
1115+
Use blitting for faster image composition. For details see
1116+
:ref:`func-animation`.
1117+
update : ['loc' | 'bbox'], optional
11161118
The legend parameter to be changed when dragged:
11171119
11181120
- 'loc': update the *loc* parameter of the legend
@@ -1132,6 +1134,7 @@ def set_draggable(self, state, use_blit=False, update='loc'):
11321134
if self._draggable is not None:
11331135
self._draggable.disconnect()
11341136
self._draggable = None
1137+
return self._draggable
11351138

11361139
def get_draggable(self):
11371140
"""Return ``True`` if the legend is draggable, ``False`` otherwise."""

0 commit comments

Comments
 (0)