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


Python rcsetup.validate_axisbelow方法代碼示例

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


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

示例1: set_axisbelow

# 需要導入模塊: from matplotlib import rcsetup [as 別名]
# 或者: from matplotlib.rcsetup import validate_axisbelow [as 別名]
def set_axisbelow(self, b):
        """
        Set the zorder for the axes ticks and gridlines.

        Parameters
        ----------
        b : bool or 'line'
            ``True`` corresponds to a zorder of 0.5, ``False`` to a zorder of
            2.5, and ``"line"`` to a zorder of 1.5.

        """
        self._axisbelow = axisbelow = validate_axisbelow(b)
        if axisbelow is True:
            zorder = 0.5
        elif axisbelow is False:
            zorder = 2.5
        elif axisbelow == "line":
            zorder = 1.5
        else:
            raise ValueError("Unexpected axisbelow value")
        for axis in self._get_axis_list():
            axis.set_zorder(zorder)
        self.stale = True 
開發者ID:Relph1119,項目名稱:GraphicDesignPatternByPython,代碼行數:25,代碼來源:_base.py

示例2: set_axisbelow

# 需要導入模塊: from matplotlib import rcsetup [as 別名]
# 或者: from matplotlib.rcsetup import validate_axisbelow [as 別名]
def set_axisbelow(self, b):
        """
        Set whether axis ticks and gridlines are above or below most artists.

        This controls the zorder of the ticks and gridlines. For more
        information on the zorder see :doc:`/gallery/misc/zorder_demo`.

        Parameters
        ----------
        b : bool or 'line'
            Possible values:

            - *True* (zorder = 0.5): Ticks and gridlines are below all Artists.
            - 'line' (zorder = 1.5): Ticks and gridlines are above patches
              (e.g. rectangles, with default zorder = 1) but still below lines
              and markers (with their default zorder = 2).
            - *False* (zorder = 2.5): Ticks and gridlines are above patches
              and lines / markers.

        See Also
        --------
        get_axisbelow
        """
        self._axisbelow = axisbelow = validate_axisbelow(b)
        if axisbelow is True:
            zorder = 0.5
        elif axisbelow is False:
            zorder = 2.5
        elif axisbelow == "line":
            zorder = 1.5
        else:
            raise ValueError("Unexpected axisbelow value")
        for axis in self._get_axis_list():
            axis.set_zorder(zorder)
        self.stale = True 
開發者ID:PacktPublishing,項目名稱:Mastering-Elasticsearch-7.0,代碼行數:37,代碼來源:_base.py

示例3: set_axisbelow

# 需要導入模塊: from matplotlib import rcsetup [as 別名]
# 或者: from matplotlib.rcsetup import validate_axisbelow [as 別名]
def set_axisbelow(self, b):
        """
        Set whether axis ticks and gridlines are above or below most artists.

        This controls the zorder of the ticks and gridlines. For more
        information on the zorder see :doc:`/gallery/misc/zorder_demo`.

        Parameters
        ----------
        b : bool or 'line'
            Possible values:

            - *True* (zorder = 0.5): Ticks and gridlines are below all Artists.
            - 'line' (zorder = 1.5): Ticks and gridlines are above patches (
              e.g. rectangles) but still below lines / markers.
            - *False* (zorder = 2.5): Ticks and gridlines are above patches
              and lines / markers.

        See Also
        --------
        get_axisbelow
        """
        self._axisbelow = axisbelow = validate_axisbelow(b)
        if axisbelow is True:
            zorder = 0.5
        elif axisbelow is False:
            zorder = 2.5
        elif axisbelow == "line":
            zorder = 1.5
        else:
            raise ValueError("Unexpected axisbelow value")
        for axis in self._get_axis_list():
            axis.set_zorder(zorder)
        self.stale = True 
開發者ID:holzschu,項目名稱:python3_ios,代碼行數:36,代碼來源:_base.py

示例4: set_axisbelow

# 需要導入模塊: from matplotlib import rcsetup [as 別名]
# 或者: from matplotlib.rcsetup import validate_axisbelow [as 別名]
def set_axisbelow(self, b):
        """
        Set whether axis ticks and gridlines are above or below most artists.

        .. ACCEPTS: [ bool | 'line' ]

        Parameters
        ----------
        b : bool or 'line'
        """
        self._axisbelow = validate_axisbelow(b)
        self.stale = True 
開發者ID:alvarobartt,項目名稱:twitter-stock-recommendation,代碼行數:14,代碼來源:_base.py


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