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


Python Axes.text方法代碼示例

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


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

示例1: xlabel

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import text [as 別名]
def xlabel(s, *args, **kwargs):
    """
    Set the *x* axis label of the current axis.

    Default override is::

      override = {
          'fontsize'            : 'small',
          'verticalalignment'   : 'top',
          'horizontalalignment' : 'center'
          }

    .. seealso::

        :func:`~matplotlib.pyplot.text`
            For information on how override and the optional args work
    """
    l =  gca().set_xlabel(s, *args, **kwargs)
    draw_if_interactive()
    return l 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:22,代碼來源:pyplot.py

示例2: ylabel

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import text [as 別名]
def ylabel(s, *args, **kwargs):
    """
    Set the *y* axis label of the current axis.

    Defaults override is::

        override = {
           'fontsize'            : 'small',
           'verticalalignment'   : 'center',
           'horizontalalignment' : 'right',
           'rotation'='vertical' : }

    .. seealso::

        :func:`~matplotlib.pyplot.text`
            For information on how override and the optional args
            work.
    """
    l = gca().set_ylabel(s, *args, **kwargs)
    draw_if_interactive()
    return l 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:23,代碼來源:pyplot.py

示例3: figtext

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import text [as 別名]
def figtext(*args, **kwargs):

    ret =  gcf().text(*args, **kwargs)
    draw_if_interactive()
    return ret 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:7,代碼來源:pyplot.py

示例4: text

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import text [as 別名]
def text(x, y, s, fontdict=None, withdash=False, **kwargs):
    ret = gca().text(x, y, s, fontdict=fontdict, withdash=withdash, **kwargs)
    draw_if_interactive()
    return ret

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

示例5: get_zlabel

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import text [as 別名]
def get_zlabel(self) :
        """
        Get the z-label text string.

        .. versionadded :: 1.1.0
            This function was added, but not tested. Please report any bugs.
        """
        label = self.zaxis.get_label()
        return label.get_text()

    #### Axes rectangle characteristics 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:13,代碼來源:axes3d.py

示例6: text

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import text [as 別名]
def text(self, x, y, z, s, zdir=None, **kwargs):
        '''
        Add text to the plot. kwargs will be passed on to Axes.text,
        except for the `zdir` keyword, which sets the direction to be
        used as the z direction.
        '''
        text = Axes.text(self, x, y, s, **kwargs)
        art3d.text_2d_to_3d(text, z, zdir)
        return text 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:11,代碼來源:axes3d.py

示例7: xticks

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import text [as 別名]
def xticks(*args, **kwargs):
    """
    Get or set the *x*-limits of the current tick locations and labels.

    ::

      # return locs, labels where locs is an array of tick locations and
      # labels is an array of tick labels.
      locs, labels = xticks()

      # set the locations of the xticks
      xticks( arange(6) )

      # set the locations and labels of the xticks
      xticks( arange(5), ('Tom', 'Dick', 'Harry', 'Sally', 'Sue') )

    The keyword args, if any, are :class:`~matplotlib.text.Text`
    properties. For example, to rotate long labels::

      xticks( arange(12), calendar.month_name[1:13], rotation=17 )
    """
    ax = gca()

    if len(args)==0:
        locs = ax.get_xticks()
        labels = ax.get_xticklabels()
    elif len(args)==1:
        locs = ax.set_xticks(args[0])
        labels = ax.get_xticklabels()
    elif len(args)==2:
        locs = ax.set_xticks(args[0])
        labels = ax.set_xticklabels(args[1], **kwargs)
    else: raise TypeError('Illegal number of arguments to xticks')
    if len(kwargs):
        for l in labels:
            l.update(kwargs)

    draw_if_interactive()
    return locs, silent_list('Text xticklabel', labels) 
開發者ID:miloharper,項目名稱:neural-network-animation,代碼行數:41,代碼來源:pyplot.py

示例8: figtext

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import text [as 別名]
def figtext(x, y, s, *args, **kwargs):
    return gcf().text(x, y, s, *args, **kwargs) 
開發者ID:Relph1119,項目名稱:GraphicDesignPatternByPython,代碼行數:4,代碼來源:pyplot.py

示例9: annotate

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import text [as 別名]
def annotate(text, xy, *args, **kwargs):
    return gca().annotate(text=text, xy=xy, *args, **kwargs)

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

示例10: text

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import text [as 別名]
def text(x, y, s, fontdict=None, withdash=False, **kwargs):
    return gca().text(
        x=x, y=y, s=s, fontdict=fontdict, withdash=withdash, **kwargs)

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

示例11: get_zlabel

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import text [as 別名]
def get_zlabel(self):
        """
        Get the z-label text string.

        .. versionadded :: 1.1.0
            This function was added, but not tested. Please report any bugs.
        """
        label = self.zaxis.get_label()
        return label.get_text()

    #### Axes rectangle characteristics 
開發者ID:Relph1119,項目名稱:GraphicDesignPatternByPython,代碼行數:13,代碼來源:axes3d.py

示例12: text

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import text [as 別名]
def text(x, y, s, fontdict=None, withdash=False, **kwargs):
    return gca().text(x, y, s, fontdict=fontdict, withdash=withdash, **kwargs)


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

示例13: text

# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import text [as 別名]
def text(
        x, y, s, fontdict=None,
        withdash=cbook.deprecation._deprecated_parameter, **kwargs):
    return gca().text(x, y, s, fontdict=fontdict, withdash=withdash, **kwargs)


# Autogenerated by boilerplate.py.  Do not edit as changes will be lost. 
開發者ID:boris-kz,項目名稱:CogAlg,代碼行數:9,代碼來源:pyplot.py


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