本文整理汇总了Python中matplotlib.figure.Figure.waitforbuttonpress方法的典型用法代码示例。如果您正苦于以下问题:Python Figure.waitforbuttonpress方法的具体用法?Python Figure.waitforbuttonpress怎么用?Python Figure.waitforbuttonpress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.figure.Figure
的用法示例。
在下文中一共展示了Figure.waitforbuttonpress方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_plot_commands
# 需要导入模块: from matplotlib.figure import Figure [as 别名]
# 或者: from matplotlib.figure.Figure import waitforbuttonpress [as 别名]
def get_plot_commands():
"""
Get a sorted list of all of the plotting commands.
"""
# This works by searching for all functions in this module and removing
# a few hard-coded exclusions, as well as all of the colormap-setting
# functions, and anything marked as private with a preceding underscore.
exclude = {'colormaps', 'colors', 'connect', 'disconnect',
'get_plot_commands', 'get_current_fig_manager', 'ginput',
'plotting', 'waitforbuttonpress'}
exclude |= set(colormaps())
this_module = inspect.getmodule(get_plot_commands)
return sorted(
name for name, obj in globals().items()
if not name.startswith('_') and name not in exclude
and inspect.isfunction(obj)
and inspect.getmodule(obj) is this_module)
示例2: get_plot_commands
# 需要导入模块: from matplotlib.figure import Figure [as 别名]
# 或者: from matplotlib.figure.Figure import waitforbuttonpress [as 别名]
def get_plot_commands():
"""
Get a sorted list of all of the plotting commands.
"""
# This works by searching for all functions in this module and
# removing a few hard-coded exclusions, as well as all of the
# colormap-setting functions, and anything marked as private with
# a preceding underscore.
import inspect
exclude = {'colormaps', 'colors', 'connect', 'disconnect',
'get_plot_commands', 'get_current_fig_manager', 'ginput',
'plotting', 'waitforbuttonpress'}
exclude |= set(colormaps())
this_module = inspect.getmodule(get_plot_commands)
commands = set()
for name, obj in list(six.iteritems(globals())):
if name.startswith('_') or name in exclude:
continue
if inspect.isfunction(obj) and inspect.getmodule(obj) is this_module:
commands.add(name)
return sorted(commands)
示例3: waitforbuttonpress
# 需要导入模块: from matplotlib.figure import Figure [as 别名]
# 或者: from matplotlib.figure.Figure import waitforbuttonpress [as 别名]
def waitforbuttonpress(*args, **kwargs):
"""
Blocking call to interact with the figure.
This will wait for *n* key or mouse clicks from the user and
return a list containing True's for keyboard clicks and False's
for mouse clicks.
If *timeout* is negative, does not timeout.
"""
return gcf().waitforbuttonpress(*args, **kwargs)
# Putting things in figures
示例4: get_plot_commands
# 需要导入模块: from matplotlib.figure import Figure [as 别名]
# 或者: from matplotlib.figure.Figure import waitforbuttonpress [as 别名]
def get_plot_commands():
"""
Get a sorted list of all of the plotting commands.
"""
# This works by searching for all functions in this module and
# removing a few hard-coded exclusions, as well as all of the
# colormap-setting functions, and anything marked as private with
# a preceding underscore.
import inspect
exclude = set(['colormaps', 'colors', 'connect', 'disconnect',
'get_plot_commands', 'get_current_fig_manager',
'ginput', 'plotting', 'waitforbuttonpress'])
exclude |= set(colormaps())
this_module = inspect.getmodule(get_plot_commands)
commands = set()
for name, obj in globals().items():
if name.startswith('_') or name in exclude:
continue
if inspect.isfunction(obj) and inspect.getmodule(obj) is this_module:
commands.add(name)
commands = list(commands)
commands.sort()
return commands
示例5: get_plot_commands
# 需要导入模块: from matplotlib.figure import Figure [as 别名]
# 或者: from matplotlib.figure.Figure import waitforbuttonpress [as 别名]
def get_plot_commands():
"""
Get a sorted list of all of the plotting commands.
"""
# This works by searching for all functions in this module and
# removing a few hard-coded exclusions, as well as all of the
# colormap-setting functions, and anything marked as private with
# a preceding underscore.
import inspect
exclude = set(['colormaps', 'colors', 'connect', 'disconnect',
'get_plot_commands', 'get_current_fig_manager',
'ginput', 'plotting', 'waitforbuttonpress'])
exclude |= set(colormaps())
this_module = inspect.getmodule(get_plot_commands)
commands = set()
for name, obj in list(six.iteritems(globals())):
if name.startswith('_') or name in exclude:
continue
if inspect.isfunction(obj) and inspect.getmodule(obj) is this_module:
commands.add(name)
commands = list(commands)
commands.sort()
return commands
示例6: waitforbuttonpress
# 需要导入模块: from matplotlib.figure import Figure [as 别名]
# 或者: from matplotlib.figure.Figure import waitforbuttonpress [as 别名]
def waitforbuttonpress(*args, **kwargs):
"""
Blocking call to interact with the figure.
This will wait for *n* key or mouse clicks from the user and
return a list containing True's for keyboard clicks and False's
for mouse clicks.
If *timeout* is negative, does not timeout.
"""
return gcf().waitforbuttonpress(*args, **kwargs)
## Putting things in figures ##