本文整理汇总了Python中matplotlib.collections.PolyCollection.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python PolyCollection.__init__方法的具体用法?Python PolyCollection.__init__怎么用?Python PolyCollection.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.collections.PolyCollection
的用法示例。
在下文中一共展示了PolyCollection.__init__方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from matplotlib.collections import PolyCollection [as 别名]
# 或者: from matplotlib.collections.PolyCollection import __init__ [as 别名]
def __init__(self, ax, *args, **kw):
self.ax = ax
X, Y, U, V, C = self._parse_args(*args)
self.X = X
self.Y = Y
self.N = len(X)
self.scale = kw.pop('scale', None)
self.headwidth = kw.pop('headwidth', 3)
self.headlength = float(kw.pop('headlength', 5))
self.headaxislength = kw.pop('headaxislength', 4.5)
self.minshaft = kw.pop('minshaft', 1)
self.minlength = kw.pop('minlength', 1)
self.units = kw.pop('units', 'width')
self.width = kw.pop('width', None)
self.color = kw.pop('color', 'k')
self.pivot = kw.pop('pivot', 'tail')
kw.setdefault('facecolors', self.color)
kw.setdefault('linewidths', (0,))
PolyCollection.__init__(self, None, offsets=zip(X, Y),
transOffset=ax.transData, **kw)
self.polykw = kw
self.set_UVC(U, V, C)
self._initialized = False
self.keyvec = None
self.keytext = None
示例2: __init__
# 需要导入模块: from matplotlib.collections import PolyCollection [as 别名]
# 或者: from matplotlib.collections.PolyCollection import __init__ [as 别名]
def __init__(self, verts, *args, **kwargs):
'''
Create a Poly3DCollection.
*verts* should contain 3D coordinates.
Keyword arguments:
zsort, see set_zsort for options.
Note that this class does a bit of magic with the _facecolors
and _edgecolors properties.
'''
zsort = kwargs.pop('zsort', True)
PolyCollection.__init__(self, verts, *args, **kwargs)
self.set_zsort(zsort)
示例3: __init__
# 需要导入模块: from matplotlib.collections import PolyCollection [as 别名]
# 或者: from matplotlib.collections.PolyCollection import __init__ [as 别名]
def __init__(self, map, mask, nest=False, **kwargs):
nside = healpix.npix2nside(len(mask))
self.v, ind = pix2quad(nside, mask.nonzero()[0], nest)
#print(len(ind), len(self.v), mask.sum())
PolyCollection.__init__(self, self.v, array=map[ind], **kwargs)