pyvista.plotting.charts.Axis#

class Axis(label='', range=None, grid=True, *, _wrap=None)[source]#

Pythonic interface for a VTK Axis, used by 2D charts.

Parameters
labelstr, optional

Axis label. Defaults to the empty string "" (no visible label).

rangelist or tuple of float, optional

Axis range, denoting the minimum and maximum values displayed on this axis. Setting this to any valid value other than None will change this axis behavior to 'fixed'. Setting it to None will change the axis behavior to 'auto'. Defaults to None (automatically scale axis).

gridbool, optional

Flag to toggle grid lines visibility for this axis. Defaults to True.

Other Parameters
_wrapvtk.vtkAxis, optional

Wrap an existing VTK Axis instance. Defaults to None (no wrapping).

Attributes
penPen

Pen used to draw the axis.

grid_penPen

Pen used to draw the grid lines.

Methods

Axis.toggle()

Toggle the axis' visibility.

Attributes

Axis.behavior

Set the axis' scaling behavior.

Axis.grid

Return or set the axis' grid line visibility.

Axis.label

Return or set the axis label.

Axis.label_size

Return or set the size of the axis label font.

Axis.label_visible

Return or set the axis label's visibility.

Axis.log_scale

Flag denoting whether a log scale is used for this axis.

Axis.margin

Return or set the axis margin.

Axis.range

Return or set the axis range.

Axis.tick_count

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

Axis.tick_label_size

Return or set the size of the axis tick label font.

Axis.tick_labels

Return or set the tick labels for this axis.

Axis.tick_labels_offset

Return or set the offset of the tick labels for this axis.

Axis.tick_labels_visible

Return or set the tick label visibility for this axis.

Axis.tick_locations

Return or set the tick locations for this axis.

Axis.tick_size

Return or set the size of this axis' ticks.

Axis.ticks_visible

Return or set the tick visibility for this axis.

Axis.visible

Return or set the axis' visibility.