当前位置: 首页>>代码示例>>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;未经允许,请勿转载。