AxisItem

class pyqtgraph.AxisItem(orientation, pen=None, linkView=None, parent=None, maxTickLength=-5)
__init__(orientation, pen=None, linkView=None, parent=None, maxTickLength=-5)

GraphicsItem showing a single plot axis with ticks, values, and label. Can be configured to fit on any side of a plot, and can automatically synchronize its displayed scale with ViewBox items. Ticks can be extended to make a grid.

setGrid(grid)

Set the alpha value for the grid, or False to disable.

setScale(scale=None)

Set the value scaling for this axis. The scaling value 1) multiplies the values displayed along the axis and 2) changes the way units are displayed in the label. For example:

If the axis spans values from -0.1 to 0.1 and has units set to ‘V’ then a scale of 1000 would cause the axis to display values -100 to 100 and the units would appear as ‘mV’

If scale is None, then it will be determined automatically based on the current range displayed by the axis.

Previous topic

GraphicsLayout

Next topic

ArrowItem

This Page