本文整理匯總了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
示例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
示例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
示例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