当前位置: 首页>>代码示例>>Python>>正文


Python widgets.LockDraw方法代码示例

本文整理汇总了Python中matplotlib.widgets.LockDraw方法的典型用法代码示例。如果您正苦于以下问题:Python widgets.LockDraw方法的具体用法?Python widgets.LockDraw怎么用?Python widgets.LockDraw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在matplotlib.widgets的用法示例。


在下文中一共展示了widgets.LockDraw方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from matplotlib import widgets [as 别名]
# 或者: from matplotlib.widgets import LockDraw [as 别名]
def __init__(self, figure):
        figure.set_canvas(self)
        self.figure = figure
        # a dictionary from event name to a dictionary that maps cid->func
        self.callbacks = cbook.CallbackRegistry()
        self.widgetlock = widgets.LockDraw()
        self._button = None  # the button pressed
        self._key = None  # the key pressed
        self._lastx, self._lasty = None, None
        self.button_pick_id = self.mpl_connect('button_press_event', self.pick)
        self.scroll_pick_id = self.mpl_connect('scroll_event', self.pick)
        self.mouse_grabber = None  # the axes currently grabbing mouse
        self.toolbar = None  # NavigationToolbar2 will set me
        self._is_saving = False
        if False:
            ## highlight the artists that are hit
            self.mpl_connect('motion_notify_event', self.onHilite)
            ## delete the artists that are clicked on
            #self.mpl_disconnect(self.button_pick_id)
            #self.mpl_connect('button_press_event',self.onRemove) 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:22,代码来源:backend_bases.py

示例2: __init__

# 需要导入模块: from matplotlib import widgets [as 别名]
# 或者: from matplotlib.widgets import LockDraw [as 别名]
def __init__(self, figure=None):
        _log.warning('Treat the new Tool classes introduced in v1.5 as '
                     'experimental for now, the API will likely change in '
                     'version 2.1 and perhaps the rcParam as well')

        self._key_press_handler_id = None

        self._tools = {}
        self._keys = {}
        self._toggled = {}
        self._callbacks = cbook.CallbackRegistry()

        # to process keypress event
        self.keypresslock = widgets.LockDraw()
        self.messagelock = widgets.LockDraw()

        self._figure = None
        self.set_figure(figure) 
开发者ID:PacktPublishing,项目名称:Mastering-Elasticsearch-7.0,代码行数:20,代码来源:backend_managers.py

示例3: __init__

# 需要导入模块: from matplotlib import widgets [as 别名]
# 或者: from matplotlib.widgets import LockDraw [as 别名]
def __init__(self, figure=None):
        warnings.warn('Treat the new Tool classes introduced in v1.5 as ' +
                       'experimental for now, the API will likely change in ' +
                       'version 2.1 and perhaps the rcParam as well')

        self._key_press_handler_id = None

        self._tools = {}
        self._keys = {}
        self._toggled = {}
        self._callbacks = cbook.CallbackRegistry()

        # to process keypress event
        self.keypresslock = widgets.LockDraw()
        self.messagelock = widgets.LockDraw()

        self._figure = None
        self.set_figure(figure) 
开发者ID:Relph1119,项目名称:GraphicDesignPatternByPython,代码行数:20,代码来源:backend_managers.py


注:本文中的matplotlib.widgets.LockDraw方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。