本文整理匯總了Python中matplotlib.offsetbox.DraggableOffsetBox.__init__方法的典型用法代碼示例。如果您正苦於以下問題:Python DraggableOffsetBox.__init__方法的具體用法?Python DraggableOffsetBox.__init__怎麽用?Python DraggableOffsetBox.__init__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類matplotlib.offsetbox.DraggableOffsetBox
的用法示例。
在下文中一共展示了DraggableOffsetBox.__init__方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: from matplotlib.offsetbox import DraggableOffsetBox [as 別名]
# 或者: from matplotlib.offsetbox.DraggableOffsetBox import __init__ [as 別名]
def __init__(self, legend, use_blit=False, update="loc"):
"""
update : If "loc", update *loc* parameter of
legend upon finalizing. If "bbox", update
*bbox_to_anchor* parameter.
"""
self.legend = legend
if update in ["loc", "bbox"]:
self._update = update
else:
raise ValueError("update parameter '%s' is not supported." %
update)
DraggableOffsetBox.__init__(self, legend, legend._legend_box,
use_blit=use_blit)
示例2: __init__
# 需要導入模塊: from matplotlib.offsetbox import DraggableOffsetBox [as 別名]
# 或者: from matplotlib.offsetbox.DraggableOffsetBox import __init__ [as 別名]
def __init__(self, legend, use_blit=False, update="loc"):
"""
Wrapper around a `.Legend` to support mouse dragging.
Parameters
----------
legend : `.Legend`
The `.Legend` instance to wrap.
use_blit : bool, optional
Use blitting for faster image composition. For details see
:ref:`func-animation`.
update : {'loc', 'bbox'}, optional
If "loc", update the *loc* parameter of the legend upon finalizing.
If "bbox", update the *bbox_to_anchor* parameter.
"""
self.legend = legend
if update in ["loc", "bbox"]:
self._update = update
else:
raise ValueError("update parameter '%s' is not supported." %
update)
DraggableOffsetBox.__init__(self, legend, legend._legend_box,
use_blit=use_blit)
示例3: __init__
# 需要導入模塊: from matplotlib.offsetbox import DraggableOffsetBox [as 別名]
# 或者: from matplotlib.offsetbox.DraggableOffsetBox import __init__ [as 別名]
def __init__(self, legend, use_blit=False, update="loc"):
"""
Parameters
----------
update : string
If "loc", update *loc* parameter of legend upon finalizing.
If "bbox", update *bbox_to_anchor* parameter.
"""
self.legend = legend
if update in ["loc", "bbox"]:
self._update = update
else:
raise ValueError("update parameter '%s' is not supported." %
update)
DraggableOffsetBox.__init__(self, legend, legend._legend_box,
use_blit=use_blit)