当前位置: 首页>>代码示例>>Python>>正文


Python Path.wedge方法代码示例

本文整理汇总了Python中matplotlib.path.Path.wedge方法的典型用法代码示例。如果您正苦于以下问题:Python Path.wedge方法的具体用法?Python Path.wedge怎么用?Python Path.wedge使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在matplotlib.path.Path的用法示例。


在下文中一共展示了Path.wedge方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_mpl_to_bezier_path

# 需要导入模块: from matplotlib.path import Path [as 别名]
# 或者: from matplotlib.path.Path import wedge [as 别名]
    def test_mpl_to_bezier_path(self):
        """test_mpl_to_bezier_path"""

        star_path = Path.unit_regular_star(10)
        r = RendererCocoa(None, None)
        bpath = r.mpl_to_bezier_path(star_path)

        yield self.assert_paths_equal, star_path, bpath

        wedge_path = Path.wedge(10, 25)
        bpath = r.mpl_to_bezier_path(wedge_path)

        yield self.assert_paths_equal, wedge_path, bpath
开发者ID:zoccolan,项目名称:eyetracker,代码行数:15,代码来源:cocoa_backend.py

示例2: __init__

# 需要导入模块: from matplotlib.path import Path [as 别名]
# 或者: from matplotlib.path.Path import wedge [as 别名]
    def __init__(self, center, r, theta1, theta2, **kwargs):
        """
        Draw a wedge centered at x,y tuple center with radius r that
        sweeps theta1 to theta2 (angles)

        Valid kwargs are:
        %(Patch)s

        """
        Patch.__init__(self, **kwargs)
        self.center = center
        self.r = r
        self.theta1 = theta1
        self.theta2 = theta2
        self._patch_transform = transforms.IdentityTransform()
        self._path = Path.wedge(self.theta1, self.theta2)
开发者ID:,项目名称:,代码行数:18,代码来源:

示例3: __init__

# 需要导入模块: from matplotlib.path import Path [as 别名]
# 或者: from matplotlib.path.Path import wedge [as 别名]
    def __init__(self, center, r, theta1, theta2, **kwargs):
        """
        Draw a wedge centered at *x*, *y* center with radius *r* that
        sweeps *theta1* to *theta2* (in degrees).

        Valid kwargs are:

        %(Patch)s
        """
        Patch.__init__(self, **kwargs)
        self.center = center
        self.r = r
        self.theta1 = theta1
        self.theta2 = theta2
        self._patch_transform = transforms.IdentityTransform()
        self._path = Path.wedge(self.theta1, self.theta2)
开发者ID:Einstein-NTE,项目名称:einstein,代码行数:18,代码来源:patches.py

示例4: _wedge_fix

# 需要导入模块: from matplotlib.path import Path [as 别名]
# 或者: from matplotlib.path.Path import wedge [as 别名]

def _wedge_fix(wedge_path):
    # Fixes the problem with Path.wedge where it doesn't initialise the first,
    # and last two vertices.
    # This fix should not have any side-effects once Path.wedge has been fixed,
    # but will then be redundant and should be removed.
    wedge_path.vertices[0] = 0
    wedge_path.vertices[-2:] = 0
    return wedge_path


CLOUD_COVER = {
    0: [_ring_path()],
    1: [_ring_path(), _vertical_bar_path()],
    2: [_ring_path(), _wedge_fix(Path.wedge(0, 90))],
    3: [_ring_path(), _wedge_fix(Path.wedge(0, 90)), _vertical_bar_path()],
    4: [_ring_path(), Path.unit_circle_righthalf()],
    5: [_ring_path(), Path.unit_circle_righthalf(), _left_bar_path()],
    6: [_ring_path(), _wedge_fix(Path.wedge(-180, 90))],
    7: [_slot_path()],
    8: [Path.unit_circle()],
    9: [_ring_path(), _slash_path(), _backslash_path()],
}
"""
A dictionary mapping WMO cloud cover codes to their corresponding symbol.

See http://www.wmo.int/pages/prog/www/DPFS/documents/485_Vol_I_en_colour.pdf
    Part II, Appendix II.4, Graphical Representation of Data, Analyses and Forecasts

"""
开发者ID:smbz,项目名称:iris,代码行数:32,代码来源:symbols.py


注:本文中的matplotlib.path.Path.wedge方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。