當前位置: 首頁>>代碼示例>>Python>>正文


Python Axes.contourf方法代碼示例

本文整理匯總了Python中matplotlib.axes.Axes.contourf方法的典型用法代碼示例。如果您正苦於以下問題:Python Axes.contourf方法的具體用法?Python Axes.contourf怎麽用?Python Axes.contourf使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在matplotlib.axes.Axes的用法示例。


在下文中一共展示了Axes.contourf方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: contourf

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import contourf [as 別名]
def contourf(*args, **kwargs):
    ax = gca()
    # allow callers to override the hold state by passing hold=True|False
    washold = ax.ishold()
    hold = kwargs.pop('hold', None)
    if hold is not None:
        ax.hold(hold)
    try:
        ret = ax.contourf(*args, **kwargs)
        draw_if_interactive()
    finally:
        ax.hold(washold)
    if ret._A is not None: sci(ret)
    return ret

# This function was autogenerated by boilerplate.py.  Do not edit as
# changes will be lost 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:19,代碼來源:pyplot.py

示例2: contourf

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import contourf [as 別名]
def contourf(*args, **kwargs):
    ax = gca()
    # Deprecated: allow callers to override the hold state
    # by passing hold=True|False
    washold = ax._hold
    hold = kwargs.pop('hold', None)
    if hold is not None:
        ax._hold = hold
        from matplotlib.cbook import mplDeprecation
        warnings.warn("The 'hold' keyword argument is deprecated since 2.0.",
                      mplDeprecation)
    try:
        ret = ax.contourf(*args, **kwargs)
    finally:
        ax._hold = washold
    if ret._A is not None: sci(ret)
    return ret

# Autogenerated by boilerplate.py.  Do not edit as changes will be lost. 
開發者ID:alvarobartt,項目名稱:twitter-stock-recommendation,代碼行數:21,代碼來源:pyplot.py

示例3: colorbar

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import contourf [as 別名]
def colorbar(mappable=None, cax=None, ax=None, **kw):
    if mappable is None:
        mappable = gci()
        if mappable is None:
            raise RuntimeError('No mappable was found to use for colorbar '
                               'creation. First define a mappable such as '
                               'an image (with imshow) or a contour set ('
                               'with contourf).')
    if ax is None:
        ax = gca()

    ret = gcf().colorbar(mappable, cax = cax, ax=ax, **kw)
    draw_if_interactive()
    return ret 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:16,代碼來源:pyplot.py

示例4: contourf

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import contourf [as 別名]
def contourf(self, X, Y, Z, *args, **kwargs):
        '''
        Create a 3D contourf plot.

        ==========  ================================================
        Argument    Description
        ==========  ================================================
        *X*, *Y*,   Data values as numpy.arrays
        *Z*
        *zdir*      The direction to use: x, y or z (default)
        *offset*    If specified plot a projection of the filled contour
                    on this position in plane normal to zdir
        ==========  ================================================

        The positional and keyword arguments are passed on to
        :func:`~matplotlib.axes.Axes.contourf`

        Returns a :class:`~matplotlib.axes.Axes.contourf`

        .. versionchanged :: 1.1.0
            The *zdir* and *offset* kwargs were added.
        '''

        zdir = kwargs.pop('zdir', 'z')
        offset = kwargs.pop('offset', None)

        had_data = self.has_data()

        jX, jY, jZ = art3d.rotate_axes(X, Y, Z, zdir)
        cset = Axes.contourf(self, jX, jY, jZ, *args, **kwargs)
        self.add_contourf_set(cset, zdir, offset)

        self.auto_scale_xyz(X, Y, Z, had_data)
        return cset 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:36,代碼來源:axes3d.py

示例5: tricontourf

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import contourf [as 別名]
def tricontourf(self, X, Y, Z, offset=None, zdir='z', *args, **kwargs):
        '''
        Create a 3D contourf plot.

        ==========  ================================================
        Argument    Description
        ==========  ================================================
        *X*, *Y*,   Data values as numpy.arrays
        *Z*
        *zdir*      The direction to use: x, y or z (default)
        *offset*    If specified plot a projection of the contour
                    lines on this position in plane normal to zdir
        ==========  ================================================

        Other keyword arguments are passed on to
        :func:`~matplotlib.axes.Axes.tricontour`

        Returns a :class:`~matplotlib.axes.Axes.contour`

        .. versionadded :: 1.1.0
        '''
        zdir = kwargs.pop('zdir', 'z')
        offset = kwargs.pop('offset', None)

        had_data = self.has_data()

        jX, jY, jZ = art3d.rotate_axes(X, Y, Z, zdir)
        cset = Axes.tricontourf(self, X, Y, Z, *args, **kwargs)
        self.add_contourf_set(cset, zdir, offset)

        self.auto_scale_xyz(X, Y, Z, had_data)
        return cset 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:34,代碼來源:axes3d.py

示例6: colorbar

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import contourf [as 別名]
def colorbar(mappable=None, cax=None, ax=None, **kw):
    if mappable is None:
        mappable = gci()
        if mappable is None:
            raise RuntimeError('No mappable was found to use for colorbar '
                               'creation. First define a mappable such as '
                               'an image (with imshow) or a contour set ('
                               'with contourf).')
    if ax is None:
        ax = gca()

    ret = gcf().colorbar(mappable, cax = cax, ax=ax, **kw)
    return ret 
開發者ID:Relph1119,項目名稱:GraphicDesignPatternByPython,代碼行數:15,代碼來源:pyplot.py

示例7: contourf

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import contourf [as 別名]
def contourf(*args, data=None, **kwargs):
    __ret = gca().contourf(*args, data=data, **kwargs)
    if __ret._A is not None: sci(__ret)
    return __ret

# Autogenerated by boilerplate.py.  Do not edit as changes will be lost. 
開發者ID:Relph1119,項目名稱:GraphicDesignPatternByPython,代碼行數:8,代碼來源:pyplot.py

示例8: contourf

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import contourf [as 別名]
def contourf(*args, data=None, **kwargs):
    __ret = gca().contourf(
        *args, **({"data": data} if data is not None else {}),
        **kwargs)
    if __ret._A is not None: sci(__ret)  # noqa
    return __ret


# Autogenerated by boilerplate.py.  Do not edit as changes will be lost. 
開發者ID:holzschu,項目名稱:python3_ios,代碼行數:11,代碼來源:pyplot.py

示例9: colorbar

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import contourf [as 別名]
def colorbar(mappable=None, cax=None, ax=None, **kw):
    if mappable is None:
        mappable = gci()
        if mappable is None:
            raise RuntimeError('No mappable was found to use for colorbar '
                               'creation. First define a mappable such as '
                               'an image (with imshow) or a contour set ('
                               'with contourf).')
    if ax is None:
        ax = gca()
    ret = gcf().colorbar(mappable, cax=cax, ax=ax, **kw)
    return ret 
開發者ID:boris-kz,項目名稱:CogAlg,代碼行數:14,代碼來源:pyplot.py

示例10: tricontourf

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import contourf [as 別名]
def tricontourf(self, *args, **kwargs):
        """
        Create a 3D contourf plot.

        ==========  ================================================
        Argument    Description
        ==========  ================================================
        *X*, *Y*,   Data values as numpy.arrays
        *Z*
        *zdir*      The direction to use: x, y or z (default)
        *offset*    If specified plot a projection of the contour
                    lines on this position in plane normal to zdir
        ==========  ================================================

        Other keyword arguments are passed on to
        :func:`~matplotlib.axes.Axes.tricontour`

        Returns a :class:`~matplotlib.axes.Axes.contour`

        .. versionchanged :: 1.3.0
            Added support for custom triangulations

        EXPERIMENTAL:  This method currently produces incorrect output due to a
        longstanding bug in 3D PolyCollection rendering.
        """
        zdir = kwargs.pop('zdir', 'z')
        offset = kwargs.pop('offset', None)

        had_data = self.has_data()

        tri, args, kwargs = Triangulation.get_from_args_and_kwargs(
                *args, **kwargs)
        X = tri.x
        Y = tri.y
        if 'Z' in kwargs:
            Z = kwargs.pop('Z')
        else:
            Z = args[0]
            # We do this so Z doesn't get passed as an arg to Axes.tricontourf
            args = args[1:]

        jX, jY, jZ = art3d.rotate_axes(X, Y, Z, zdir)
        tri = Triangulation(jX, jY, tri.triangles, tri.mask)

        cset = Axes.tricontourf(self, tri, jZ, *args, **kwargs)
        self.add_contourf_set(cset, zdir, offset)

        self.auto_scale_xyz(X, Y, Z, had_data)
        return cset 
開發者ID:Sterncat,項目名稱:opticspy,代碼行數:51,代碼來源:axes3d.py


注:本文中的matplotlib.axes.Axes.contourf方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。