コード例 #1
0
ファイル: patch.py プロジェクト: Jeitan/cartopy
def path_segments(path, **kwargs):
    """
    Create an array of vertices and a corresponding array of codes from a
    :class:`matplotlib.path.Path`.

    Parameters
    ----------
    path
        A :class:`matplotlib.path.Path` instance.

    Other Parameters
    ----------------
    kwargs
        See :func:`matplotlib.path.iter_segments` for details of the keyword
        arguments.

    Returns
    -------
    vertices, codes
        A (vertices, codes) tuple, where vertices is a numpy array of
        coordinates, and codes is a numpy array of matplotlib path codes.
        See :class:`matplotlib.path.Path` for information on the types of
        codes and their meanings.

    """
    pth = path.cleaned(**kwargs)
    return pth.vertices[:-1, :], pth.codes[:-1]
コード例 #2
0
ファイル: patch.py プロジェクト: weber-s/cartopy
def path_segments(path, **kwargs):
    """
    Create an array of vertices and a corresponding array of codes from a
    :class:`matplotlib.path.Path`.

    Parameters
    ----------
    path
        A :class:`matplotlib.path.Path` instance.

    Other Parameters
    ----------------
    kwargs
        See :func:`matplotlib.path.iter_segments` for details of the keyword
        arguments.

    Returns
    -------
    vertices, codes
        A (vertices, codes) tuple, where vertices is a numpy array of
        coordinates, and codes is a numpy array of matplotlib path codes.
        See :class:`matplotlib.path.Path` for information on the types of
        codes and their meanings.

    """
    pth = path.cleaned(**kwargs)
    return pth.vertices[:-1, :], pth.codes[:-1]
コード例 #3
0
ファイル: patch.py プロジェクト: ajdawson/cartopy
 def path_segments(path, **kwargs):
     pth = path.cleaned(**kwargs)
     return pth.vertices[:-1, :], pth.codes[:-1]
コード例 #4
0
ファイル: patch.py プロジェクト: raybellwaves/cartopy
 def path_segments(path, **kwargs):
     pth = path.cleaned(**kwargs)
     return pth.vertices[:-1, :], pth.codes[:-1]