本文整理汇总了Python中matplotlib.spines.Spine方法的典型用法代码示例。如果您正苦于以下问题:Python spines.Spine方法的具体用法?Python spines.Spine怎么用?Python spines.Spine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.spines
的用法示例。
在下文中一共展示了spines.Spine方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _set_axes
# 需要导入模块: from matplotlib import spines [as 别名]
# 或者: from matplotlib.spines import Spine [as 别名]
def _set_axes(self):
""" Set some essential attributes of axes in canvas.
We put these attribute settings here for code reuse.
"""
# Add an axes to figure.
# NOTE: here we use the canvas facecolor as the axes facecolor.
self.axes = self.figure.add_subplot(111, facecolor=self.facecolor)
# Change the spine color of axes.
if self.edgecolor:
for child in self.axes.get_children():
if isinstance(child, Spine):
child.set_color(self.edgecolor)
# Set axe ticks.
if self.x_ticks is not None:
self.axes.set_xticks(self.x_ticks)
if self.y_ticks is not None:
self.axes.set_yticks(self.y_ticks)
示例2: __init__
# 需要导入模块: from matplotlib import spines [as 别名]
# 或者: from matplotlib.spines import Spine [as 别名]
def __init__(self, axes, spine_type):
if spine_type == 'bottom':
loc = 0.0
else:
loc = 1.0
mspines.Spine.__init__(self, axes, spine_type,
mpath.Path([(13, loc), (13, loc)]))
示例3: _gen_axes_spines
# 需要导入模块: from matplotlib import spines [as 别名]
# 或者: from matplotlib.spines import Spine [as 别名]
def _gen_axes_spines(self):
spines = {'top': SkewSpine(self, 'top'),
'bottom': mspines.Spine.linear_spine(self, 'bottom'),
'left': mspines.Spine.linear_spine(self, 'left'),
'right': mspines.Spine.linear_spine(self, 'right')}
return spines
示例4: _gen_axes_spines
# 需要导入模块: from matplotlib import spines [as 别名]
# 或者: from matplotlib.spines import Spine [as 别名]
def _gen_axes_spines(self):
spines = {'top': SkewSpine.linear_spine(self, 'top'),
'bottom': mspines.Spine.linear_spine(self, 'bottom'),
'left': mspines.Spine.linear_spine(self, 'left'),
'right': mspines.Spine.linear_spine(self, 'right')}
return spines
示例5: _gen_axes_spines
# 需要导入模块: from matplotlib import spines [as 别名]
# 或者: from matplotlib.spines import Spine [as 别名]
def _gen_axes_spines(self):
path = Wedge((0, 0), 1.0, 270, 360).get_path()
spine = mspines.Spine(self, 'circle', path)
spine.set_patch_circle((0.5, 0.5), 0.5)
return {'wedge':spine}