Skip to main content
`Ctrl`+`K`

# `axis`: utilities for plots

## SyncAxes

class SyncAxes(axes, syncLimits=True, syncScale=True, syncDirection=True, syncCenter=False, syncZoom=False, filterHiddenPlots=False)

  Synchronize a set of plot axes together.

  It is created with the expected axes and starts to synchronize them.

  It can be customized to synchronize limits, scale, and direction of axes together. By default everything is synchronized.

  The API `start()` and `stop()` can be used to enable/disable the synchronization while this object is still alive.

  If this object is destroyed the synchronization stop.

  Added in version 0.6.

  start()

    Start synchronizing axes together.

    The first axis is used as the reference for the first synchronization. After that, any changes to any axes will be used to synchronize other axes.

  isSynchronizing()

    Returns true if events are connected to the axes to synchronize them all together

    Return type:

      bool

  addAxis(axis)

    Add a new axes to synchronize.

    Parameters:

      axis (Axis) – The axis to synchronize

  removeAxis(axis)

    Remove an axis from the synchronized axes.

    Parameters:

      axis (Axis) – The axis to remove

  synchronize(mainAxis=None)

    Synchronize programatically all the axes.

    Parameters:

      mainAxis (Axis) – The axis to take as reference (Default: the first axis).

  stop()

    Stop the synchronization of the axes