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


Python image._draw_list_compositing_images方法代碼示例

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


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

示例1: draw

# 需要導入模塊: from matplotlib import image [as 別名]
# 或者: from matplotlib.image import _draw_list_compositing_images [as 別名]
def draw(self, renderer):
        """
        Render the figure using :class:`matplotlib.backend_bases.RendererBase`
        instance *renderer*.
        """

        # draw the figure bounding box, perhaps none for white figure
        if not self.get_visible():
            return

        artists = sorted(
            (artist for artist in (self.patches + self.lines + self.artists
                                   + self.images + self.axes + self.texts
                                   + self.legends)
             if not artist.get_animated()),
            key=lambda artist: artist.get_zorder())

        try:
            renderer.open_group('figure')
            if self.get_constrained_layout() and self.axes:
                self.execute_constrained_layout(renderer)
            if self.get_tight_layout() and self.axes:
                try:
                    self.tight_layout(renderer,
                                      **self._tight_parameters)
                except ValueError:
                    pass
                    # ValueError can occur when resizing a window.

            if self.frameon:
                self.patch.draw(renderer)

            mimage._draw_list_compositing_images(
                renderer, self, artists, self.suppressComposite)

            renderer.close_group('figure')
        finally:
            self.stale = False

        self._cachedRenderer = renderer
        self.canvas.draw_event(renderer) 
開發者ID:Relph1119,項目名稱:GraphicDesignPatternByPython,代碼行數:43,代碼來源:figure.py

示例2: draw

# 需要導入模塊: from matplotlib import image [as 別名]
# 或者: from matplotlib.image import _draw_list_compositing_images [as 別名]
def draw(self, renderer):
        """
        Render the figure using :class:`matplotlib.backend_bases.RendererBase`
        instance *renderer*.
        """

        # draw the figure bounding box, perhaps none for white figure
        if not self.get_visible():
            return

        artists = self.get_children()
        artists.remove(self.patch)
        artists = sorted(
            (artist for artist in artists if not artist.get_animated()),
            key=lambda artist: artist.get_zorder())

        for ax in self.axes:
            locator = ax.get_axes_locator()
            if locator:
                pos = locator(ax, renderer)
                ax.apply_aspect(pos)
            else:
                ax.apply_aspect()

            for child in ax.get_children():
                if hasattr(child, 'apply_aspect'):
                    locator = child.get_axes_locator()
                    if locator:
                        pos = locator(child, renderer)
                        child.apply_aspect(pos)
                    else:
                        child.apply_aspect()

        try:
            renderer.open_group('figure')
            if self.get_constrained_layout() and self.axes:
                self.execute_constrained_layout(renderer)
            if self.get_tight_layout() and self.axes:
                try:
                    self.tight_layout(renderer,
                                      **self._tight_parameters)
                except ValueError:
                    pass
                    # ValueError can occur when resizing a window.

            self.patch.draw(renderer)
            mimage._draw_list_compositing_images(
                renderer, self, artists, self.suppressComposite)

            renderer.close_group('figure')
        finally:
            self.stale = False

        self._cachedRenderer = renderer
        self.canvas.draw_event(renderer) 
開發者ID:boris-kz,項目名稱:CogAlg,代碼行數:57,代碼來源:figure.py

示例3: draw

# 需要導入模塊: from matplotlib import image [as 別名]
# 或者: from matplotlib.image import _draw_list_compositing_images [as 別名]
def draw(self, renderer):
        """
        Render the figure using :class:`matplotlib.backend_bases.RendererBase`
        instance *renderer*.
        """

        # draw the figure bounding box, perhaps none for white figure
        if not self.get_visible():
            return

        artists = sorted(
            (artist for artist in (self.patches + self.lines + self.artists
                                   + self.images + self.axes + self.texts
                                   + self.legends)
             if not artist.get_animated()),
            key=lambda artist: artist.get_zorder())

        try:
            renderer.open_group('figure')
            if self.get_constrained_layout() and self.axes:
                if True:
                    self.execute_constrained_layout(renderer)
                else:
                    pass
            if self.get_tight_layout() and self.axes:
                try:
                    self.tight_layout(renderer,
                                      **self._tight_parameters)
                except ValueError:
                    pass
                    # ValueError can occur when resizing a window.

            if self.frameon:
                self.patch.draw(renderer)

            mimage._draw_list_compositing_images(
                renderer, self, artists, self.suppressComposite)

            renderer.close_group('figure')
        finally:
            self.stale = False

        self._cachedRenderer = renderer
        self.canvas.draw_event(renderer) 
開發者ID:alvarobartt,項目名稱:twitter-stock-recommendation,代碼行數:46,代碼來源:figure.py


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