class_docstr: Place a legend on the figure/axes.
class_docstr_tok: ["Place","a","legend","on","the","figure\/axes","."]
docstr: Enable or disable mouse dragging support of the legend.
  
  Parameters
  ----------
  state : bool
      Whether mouse dragging is enabled.
  use_blit : bool, optional
      Use blitting for faster image composition. For details see
      :ref:`func-animation`.
  update : {'loc', 'bbox'}, optional
      The legend parameter to be changed when dragged:
  
      - 'loc': update the *loc* parameter of the legend
      - 'bbox': update the *bbox_to_anchor* parameter of the legend
  
  Returns
  -------
  `.DraggableLegend` or *None*
      If *state* is ``True`` this returns the `.DraggableLegend` helper
      instance. Otherwise this returns *None*.
docstr_tok: ["Enable","or","disable","mouse","dragging","support","of","the","legend",".","Parameters","--","--","--","--","--","state",":","bool","Whether","mouse","dragging","is","enabled",".","use_blit",":","bool",",","optional","Use","blitting","for","faster","image","composition",".","For","details","see",":","ref",":","`","func-animation","`",".","update",":","{","'loc","'",",","'bbox","'","}",",","optional","The","legend","parameter","to","be","changed","when","dragged",":","-","'loc","'",":","update","the","*","loc","*","parameter","of","the","legend","-","'bbox","'",":","update","the","*","bbox_to_anchor","*","parameter","of","the","legend","Returns","--","--","--","-","`",".DraggableLegend","`","or","*","None","*","If","*","state","*","is","``","True","``","this","returns","the","`",".DraggableLegend","`","helper","instance",".","Otherwise","this","returns","*","None","*","."]
code: def set_draggable(self, state, use_blit=False, update="loc"):
      """
      Enable or disable mouse dragging support of the legend.
  
      Parameters
      ----------
      state : bool
          Whether mouse dragging is enabled.
      use_blit : bool, optional
          Use blitting for faster image composition. For details see
          :ref:`func-animation`.
      update : {'loc', 'bbox'}, optional
          The legend parameter to be changed when dragged:
  
          - 'loc': update the *loc* parameter of the legend
          - 'bbox': update the *bbox_to_anchor* parameter of the legend
  
      Returns
      -------
      `.DraggableLegend` or *None*
          If *state* is ``True`` this returns the `.DraggableLegend` helper
          instance. Otherwise this returns *None*.
      """
      if state:
          if self._draggable is None:
              self._draggable = DraggableLegend(
                  self, use_blit, update=update
              )
      else:
          if self._draggable is not None:
              self._draggable.disconnect()
          self._draggable = None
      return self._draggable
  
imports: import itertools
  import logging
  import numbers
  import time
  import numpy
  import matplotlib
  from matplotlib import _api, _docstring, cbook, colors, offsetbox
  from matplotlib.artist import Artist, allow_rasterization
  from matplotlib.cbook import silent_list
  from matplotlib.font_manager import FontProperties
  from matplotlib.lines import Line2D
  from matplotlib.patches import Patch, Rectangle, Shadow, FancyBboxPatch, StepPatch
  from matplotlib.collections import Collection, CircleCollection, LineCollection, PathCollection, PolyCollection, RegularPolyCollection
  from matplotlib.text import Text
  from matplotlib.transforms import Bbox, BboxBase, TransformedBbox
  from matplotlib.transforms import BboxTransformTo, BboxTransformFrom
  from matplotlib.offsetbox import AnchoredOffsetbox, DraggableOffsetBox, HPacker, VPacker, DrawingArea, TextArea
  from matplotlib.container import ErrorbarContainer, BarContainer, StemContainer
  from .None import legend_handler
label_desc: Use image node_id 35 for calling the Legend obj's underlying member method code with example usage: obj.set_draggable(state, use_blit, update) and returns: self