matplotlib.axis.XAxis.set_ticks_position#

XAxis.set_ticks_position(position)[源代码][源代码]#

设置刻度位置。

参数:
位置{'top', 'bottom', 'both', 'default', 'none'}

'both' 设置刻度线出现在两个位置,但不改变刻度标签。'default' 将刻度位置重置为默认:两个位置都有刻度,标签在底部。'none' 可以在不需要任何刻度时使用。'none' 和 'both' 只影响刻度,不影响标签。

使用 matplotlib.axis.XAxis.set_ticks_position 的示例#

带有 AxesDivider 的 Colorbar

Colorbar with AxesDivider

使用嵌入轴控制颜色条的位置和大小

Control the position and size of a colorbar with Inset Axes

XKCD

XKCD

轴刻度

Axis ticks

在 Matplotlib 中选择颜色表

Choosing Colormaps in Matplotlib