本文整理汇总了Python中matplotlib.cbook.silent_list方法的典型用法代码示例。如果您正苦于以下问题:Python cbook.silent_list方法的具体用法?Python cbook.silent_list怎么用?Python cbook.silent_list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.cbook
的用法示例。
在下文中一共展示了cbook.silent_list方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_xticklabels
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import silent_list [as 别名]
def get_xticklabels(self, minor=False, which=None):
"""
Get the x tick labels as a list of `~matplotlib.text.Text` instances.
Parameters
----------
minor : bool, optional
If True return the minor ticklabels,
else return the major ticklabels.
which : None, ('minor', 'major', 'both')
Overrides `minor`.
Selects which ticklabels to return
Returns
-------
ret : list
List of `~matplotlib.text.Text` instances.
"""
return cbook.silent_list('Text xticklabel',
self.xaxis.get_ticklabels(minor=minor,
which=which))
示例2: get_yticklabels
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import silent_list [as 别名]
def get_yticklabels(self, minor=False, which=None):
"""
Get the y tick labels as a list of `~matplotlib.text.Text` instances.
Parameters
----------
minor : bool
If True return the minor ticklabels,
else return the major ticklabels
which : None, ('minor', 'major', 'both')
Overrides `minor`.
Selects which ticklabels to return
Returns
-------
ret : list
List of `~matplotlib.text.Text` instances.
"""
return cbook.silent_list('Text yticklabel',
self.yaxis.get_ticklabels(minor=minor,
which=which))
示例3: get_xticklabels
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import silent_list [as 别名]
def get_xticklabels(self, minor=False, which=None):
"""
Get the x tick labels as a list of :class:`~matplotlib.text.Text`
instances.
Parameters
----------
minor : bool
If True return the minor ticklabels,
else return the major ticklabels
which : None, ('minor', 'major', 'both')
Overrides `minor`.
Selects which ticklabels to return
Returns
-------
ret : list
List of :class:`~matplotlib.text.Text` instances.
"""
return cbook.silent_list('Text xticklabel',
self.xaxis.get_ticklabels(minor=minor,
which=which))
示例4: get_yticklabels
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import silent_list [as 别名]
def get_yticklabels(self, minor=False, which=None):
"""
Get the x tick labels as a list of :class:`~matplotlib.text.Text`
instances.
Parameters
----------
minor : bool
If True return the minor ticklabels,
else return the major ticklabels
which : None, ('minor', 'major', 'both')
Overrides `minor`.
Selects which ticklabels to return
Returns
-------
ret : list
List of :class:`~matplotlib.text.Text` instances.
"""
return cbook.silent_list('Text yticklabel',
self.yaxis.get_ticklabels(minor=minor,
which=which))
示例5: get_xticklabels
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import silent_list [as 别名]
def get_xticklabels(self, minor=False, which=None):
"""
Get the x tick labels as a list of :class:`~matplotlib.text.Text`
instances.
Parameters
----------
minor : bool, optional
If True return the minor ticklabels,
else return the major ticklabels.
which : None, ('minor', 'major', 'both')
Overrides `minor`.
Selects which ticklabels to return
Returns
-------
ret : list
List of :class:`~matplotlib.text.Text` instances.
"""
return cbook.silent_list('Text xticklabel',
self.xaxis.get_ticklabels(minor=minor,
which=which))
示例6: get_yticklabels
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import silent_list [as 别名]
def get_yticklabels(self, minor=False, which=None):
"""
Get the y tick labels as a list of :class:`~matplotlib.text.Text`
instances.
Parameters
----------
minor : bool
If True return the minor ticklabels,
else return the major ticklabels
which : None, ('minor', 'major', 'both')
Overrides `minor`.
Selects which ticklabels to return
Returns
-------
ret : list
List of :class:`~matplotlib.text.Text` instances.
"""
return cbook.silent_list('Text yticklabel',
self.yaxis.get_ticklabels(minor=minor,
which=which))
示例7: get_gridlines
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import silent_list [as 别名]
def get_gridlines(self):
'Return the grid lines as a list of Line2D instance'
ticks = self.get_major_ticks()
return cbook.silent_list('Line2D gridline',
[tick.gridline for tick in ticks])
示例8: get_majorticklabels
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import silent_list [as 别名]
def get_majorticklabels(self):
'Return a list of Text instances for the major ticklabels'
ticks = self.get_major_ticks()
labels1 = [tick.label1 for tick in ticks if tick.label1On]
labels2 = [tick.label2 for tick in ticks if tick.label2On]
return cbook.silent_list('Text major ticklabel', labels1 + labels2)
示例9: get_minorticklabels
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import silent_list [as 别名]
def get_minorticklabels(self):
'Return a list of Text instances for the minor ticklabels'
ticks = self.get_minor_ticks()
labels1 = [tick.label1 for tick in ticks if tick.label1On]
labels2 = [tick.label2 for tick in ticks if tick.label2On]
return cbook.silent_list('Text minor ticklabel', labels1 + labels2)
示例10: get_majorticklines
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import silent_list [as 别名]
def get_majorticklines(self):
'Return the major tick lines as a list of Line2D instances'
lines = []
ticks = self.get_major_ticks()
for tick in ticks:
lines.append(tick.tick1line)
lines.append(tick.tick2line)
return cbook.silent_list('Line2D ticklines', lines)
示例11: get_minorticklines
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import silent_list [as 别名]
def get_minorticklines(self):
'Return the minor tick lines as a list of Line2D instances'
lines = []
ticks = self.get_minor_ticks()
for tick in ticks:
lines.append(tick.tick1line)
lines.append(tick.tick2line)
return cbook.silent_list('Line2D ticklines', lines)
示例12: get_texts
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import silent_list [as 别名]
def get_texts(self):
'return a list of text.Text instance in the legend'
return silent_list('Text', self.texts)
示例13: xticks
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import silent_list [as 别名]
def xticks(*args, **kwargs):
"""
Get or set the *x*-limits of the current tick locations and labels.
::
# return locs, labels where locs is an array of tick locations and
# labels is an array of tick labels.
locs, labels = xticks()
# set the locations of the xticks
xticks( arange(6) )
# set the locations and labels of the xticks
xticks( arange(5), ('Tom', 'Dick', 'Harry', 'Sally', 'Sue') )
The keyword args, if any, are :class:`~matplotlib.text.Text`
properties. For example, to rotate long labels::
xticks( arange(12), calendar.month_name[1:13], rotation=17 )
"""
ax = gca()
if len(args)==0:
locs = ax.get_xticks()
labels = ax.get_xticklabels()
elif len(args)==1:
locs = ax.set_xticks(args[0])
labels = ax.get_xticklabels()
elif len(args)==2:
locs = ax.set_xticks(args[0])
labels = ax.set_xticklabels(args[1], **kwargs)
else: raise TypeError('Illegal number of arguments to xticks')
if len(kwargs):
for l in labels:
l.update(kwargs)
draw_if_interactive()
return locs, silent_list('Text xticklabel', labels)
示例14: get_zmajorticklabels
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import silent_list [as 别名]
def get_zmajorticklabels(self) :
"""
Get the ztick labels as a list of Text instances
.. versionadded :: 1.1.0
"""
return cbook.silent_list('Text zticklabel',
self.zaxis.get_majorticklabels())
示例15: get_zticklabels
# 需要导入模块: from matplotlib import cbook [as 别名]
# 或者: from matplotlib.cbook import silent_list [as 别名]
def get_zticklabels(self, minor=False) :
"""
Get ztick labels as a list of Text instances.
See :meth:`matplotlib.axes.Axes.get_yticklabels` for more details.
.. note::
Minor ticks are not supported.
.. versionadded:: 1.1.0
"""
return cbook.silent_list('Text zticklabel',
self.zaxis.get_ticklabels(minor=minor))