tick_count#

property Axis.tick_count#

Return or set the number of ticks drawn on this axis.

Setting this property to a negative value or None will automatically determine the appropriate amount of ticks to draw.

Examples

Create a 2D chart with a reduced number of ticks on the x-axis.

>>> import pyvista
>>> chart = pyvista.Chart2D()
>>> _ = chart.line([0, 1, 2], [2, 1, 3])
>>> chart.x_axis.tick_count = 5
>>> chart.show()
../../../../_images/pyvista-plotting-charts-Axis-tick_count-1_00_00.png

Revert back to automatic tick behavior.

>>> chart.x_axis.tick_count = None
>>> chart.show()
../../../../_images/pyvista-plotting-charts-Axis-tick_count-1_01_00.png