本文整理匯總了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}