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


Python Artist.__init__方法代碼示例

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


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

示例1: __init__

# 需要導入模塊: from matplotlib.artist import Artist [as 別名]
# 或者: from matplotlib.artist.Artist import __init__ [as 別名]
def __init__(self, legend, use_blit=False, update="loc"):
        """
        update : If "loc", update *loc* parameter of
                 legend upon finalizing. If "bbox", update
                 *bbox_to_anchor* parameter.
        """
        self.legend = legend

        if update in ["loc", "bbox"]:
            self._update = update
        else:
            raise ValueError("update parameter '%s' is not supported." %
                             update)

        DraggableOffsetBox.__init__(self, legend, legend._legend_box,
                                    use_blit=use_blit) 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:18,代碼來源:legend.py

示例2: __init__

# 需要導入模塊: from matplotlib.artist import Artist [as 別名]
# 或者: from matplotlib.artist.Artist import __init__ [as 別名]
def __init__(self,
                 xy, xytext=None,
                 xycoords='data', textcoords=None,
                 annotation_clip=None):
        if xytext is None:
            xytext = xy
        if textcoords is None:
            textcoords = xycoords
        # we'll draw ourself after the artist we annotate by default
        x, y = self.xytext = xytext

        self.xy = xy
        self.xycoords = xycoords
        self.textcoords = textcoords
        self.set_annotation_clip(annotation_clip)

        self._draggable = None 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:19,代碼來源:text.py

示例3: __init__

# 需要導入模塊: from matplotlib.artist import Artist [as 別名]
# 或者: from matplotlib.artist.Artist import __init__ [as 別名]
def __init__(self, legend, use_blit=False, update="loc"):
        """
        Wrapper around a `.Legend` to support mouse dragging.

        Parameters
        ----------
        legend : `.Legend`
            The `.Legend` instance to wrap.
        use_blit : bool, optional
            Use blitting for faster image composition. For details see
            :ref:`func-animation`.
        update : {'loc', 'bbox'}, optional
            If "loc", update the *loc* parameter of the legend upon finalizing.
            If "bbox", update the *bbox_to_anchor* parameter.
        """
        self.legend = legend

        if update in ["loc", "bbox"]:
            self._update = update
        else:
            raise ValueError("update parameter '%s' is not supported." %
                             update)

        DraggableOffsetBox.__init__(self, legend, legend._legend_box,
                                    use_blit=use_blit) 
開發者ID:PacktPublishing,項目名稱:Mastering-Elasticsearch-7.0,代碼行數:27,代碼來源:legend.py

示例4: __init__

# 需要導入模塊: from matplotlib.artist import Artist [as 別名]
# 或者: from matplotlib.artist.Artist import __init__ [as 別名]
def __init__(self, legend, use_blit=False, update="loc"):
        """
        Parameters
        ----------
        update : string
            If "loc", update *loc* parameter of legend upon finalizing.
            If "bbox", update *bbox_to_anchor* parameter.
        """
        self.legend = legend

        if update in ["loc", "bbox"]:
            self._update = update
        else:
            raise ValueError("update parameter '%s' is not supported." %
                             update)

        DraggableOffsetBox.__init__(self, legend, legend._legend_box,
                                    use_blit=use_blit) 
開發者ID:alvarobartt,項目名稱:twitter-stock-recommendation,代碼行數:20,代碼來源:legend.py

示例5: __init__

# 需要導入模塊: from matplotlib.artist import Artist [as 別名]
# 或者: from matplotlib.artist.Artist import __init__ [as 別名]
def __init__(self, left=None, bottom=None, right=None, top=None,
                 wspace=None, hspace=None):
        """
        All dimensions are fraction of the figure width or height.
        All values default to their rc params

        The following attributes are available

        *left*  : 0.125
            The left side of the subplots of the figure

        *right* : 0.9
            The right side of the subplots of the figure

        *bottom* : 0.1
            The bottom of the subplots of the figure

        *top* : 0.9
            The top of the subplots of the figure

        *wspace* : 0.2
            The amount of width reserved for blank space between subplots

        *hspace* : 0.2
            The amount of height reserved for white space between subplots
        """

        self.validate = True
        self.update(left, bottom, right, top, wspace, hspace) 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:31,代碼來源:figure.py

示例6: __init__

# 需要導入模塊: from matplotlib.artist import Artist [as 別名]
# 或者: from matplotlib.artist.Artist import __init__ [as 別名]
def __init__(self, objects):
        self._objects = objects 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:4,代碼來源:mpl_axes.py

示例7: __init__

# 需要導入模塊: from matplotlib.artist import Artist [as 別名]
# 或者: from matplotlib.artist.Artist import __init__ [as 別名]
def __init__(self, artist, ref_coord, unit="points"):
        self._artist = artist
        self._ref_coord = ref_coord
        self.set_unit(unit) 
開發者ID:miloharper,項目名稱:neural-network-animation,代碼行數:6,代碼來源:text.py

示例8: __init__

# 需要導入模塊: from matplotlib.artist import Artist [as 別名]
# 或者: from matplotlib.artist.Artist import __init__ [as 別名]
def __init__(self):
        Stack.__init__(self)
        self._ind = 0 
開發者ID:Relph1119,項目名稱:GraphicDesignPatternByPython,代碼行數:5,代碼來源:figure.py


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