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


Python Stack.bubble方法代码示例

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


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

示例1: bubble

# 需要导入模块: from cbook import Stack [as 别名]
# 或者: from cbook.Stack import bubble [as 别名]
 def bubble(self, a):
     return Stack.bubble(self, self._entry_from_axes(a))
开发者ID:,项目名称:,代码行数:4,代码来源:

示例2: Figure

# 需要导入模块: from cbook import Stack [as 别名]
# 或者: from cbook.Stack import bubble [as 别名]

#.........这里部分代码省略.........
        return l

    def text(self, x, y, s, *args, **kwargs):
        """
        Add text to figure at location x,y (relative 0-1 coords) See
        the help for Axis text for the meaning of the other arguments
        """

        override = _process_text_args({}, *args, **kwargs)
        t = Text(
            x=x, y=y, text=s,
            )

        t.update(override)
        self._set_artist_props(t)
        self.texts.append(t)
        return t

    def _set_artist_props(self, a):
        if a!= self:
            a.set_figure(self)
        a.set_transform(self.transFigure)

    def gca(self, **kwargs):
        """
        Return the current axes, creating one if necessary
        """
        ax = self._axstack()
        if ax is not None: return ax
        return self.add_subplot(111, **kwargs)

    def sca(self, a):
        'Set the current axes to be a and return a'
        self._axstack.bubble(a)
        for func in self._axobservers: func(self)
        return a

    def add_axobserver(self, func):
        'whenever the axes state change, func(self) will be called'
        self._axobservers.append(func)


    def savefig(self, *args, **kwargs):
        """
        SAVEFIG(fname, dpi=None, facecolor='w', edgecolor='w',
        orientation='portrait', papertype=None, format=None):

        Save the current figure.

        fname - the filename to save the current figure to.  The
                output formats supported depend on the backend being
                used.  and are deduced by the extension to fname.
                Possibilities are eps, jpeg, pdf, png, ps, svg.  fname
                can also be a file or file-like object - cairo backend
                only.  dpi - is the resolution in dots per inch.  If
                None it will default to the value savefig.dpi in the
                matplotlibrc file

        facecolor and edgecolor are the colors of the figure rectangle

        orientation is either 'landscape' or 'portrait' - not supported on
        all backends; currently only on postscript output

        papertype is is one of 'letter', 'legal', 'executive', 'ledger', 'a0'
        through 'a10', or 'b0' through 'b10' - only supported for postscript
        output
开发者ID:,项目名称:,代码行数:70,代码来源:

示例3: bubble

# 需要导入模块: from cbook import Stack [as 别名]
# 或者: from cbook.Stack import bubble [as 别名]
 def bubble(self, a):
     """
     Move the given axes, which must already exist in the
     stack, to the top.
     """
     return Stack.bubble(self, self._entry_from_axes(a))
开发者ID:KennethNielsen,项目名称:matplotlib,代码行数:8,代码来源:figure.py

示例4: Figure

# 需要导入模块: from cbook import Stack [as 别名]
# 或者: from cbook.Stack import bubble [as 别名]

#.........这里部分代码省略.........
        %(Text)s
        """

        override = _process_text_args({}, *args, **kwargs)
        t = Text(
            x=x, y=y, text=s,
            )

        t.update(override)
        self._set_artist_props(t)
        self.texts.append(t)
        return t
    text.__doc__ = dedent(text.__doc__) % artist.kwdocd

    def _set_artist_props(self, a):
        if a!= self:
            a.set_figure(self)
        a.set_transform(self.transFigure)

    def gca(self, **kwargs):
        """
        Return the current axes, creating one if necessary

        The following kwargs are supported
        %(Axes)s
        """
        ax = self._axstack()
        if ax is not None: return ax
        return self.add_subplot(111, **kwargs)
    gca.__doc__ = dedent(gca.__doc__) % artist.kwdocd

    def sca(self, a):
        'Set the current axes to be a and return a'
        self._axstack.bubble(a)
        for func in self._axobservers: func(self)
        return a

    def add_axobserver(self, func):
        'whenever the axes state change, func(self) will be called'
        self._axobservers.append(func)


    def savefig(self, *args, **kwargs):
        """
        SAVEFIG(fname, dpi=None, facecolor='w', edgecolor='w',
        orientation='portrait', papertype=None, format=None):

        Save the current figure.

        fname - the filename to save the current figure to.  The
                output formats supported depend on the backend being
                used.  and are deduced by the extension to fname.
                Possibilities are eps, jpeg, pdf, png, ps, svg.  fname
                can also be a file or file-like object - cairo backend
                only.

        dpi - is the resolution in dots per inch.  If
              None it will default to the value savefig.dpi in the
              matplotlibrc file

        facecolor and edgecolor are the colors of the figure rectangle

        orientation is either 'landscape' or 'portrait' - not supported on
        all backends; currently only on postscript output

        papertype is is one of 'letter', 'legal', 'executive', 'ledger', 'a0'
开发者ID:gkliska,项目名称:razvoj,代码行数:70,代码来源:figure.py


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