Skip to main content
`Ctrl`+`K`

# `PlotToolButtons`: QToolButtons for plot widgets

This module provides a set of QToolButton to use with `PlotWidget`.

The following QToolButton are available:

- `AspectToolButton`

- `YAxisOriginToolButton`

- `ProfileToolButton`

- `RulerToolButton`

- `SymbolToolButton`

class AspectToolButton(parent=None, plot=None)

  Tool button to switch keep aspect ratio of a plot

  STATE = None

    Lazy loaded states used to feed AspectToolButton

  keepDataAspectRatio()

    Configure the plot to keep the aspect ratio

  dontKeepDataAspectRatio()

    Configure the plot to not keep the aspect ratio

class YAxisOriginToolButton(parent=None, plot=None)

  Tool button to switch the Y axis orientation of a plot.

  STATE = None

    Lazy loaded states used to feed YAxisOriginToolButton

  setYAxisUpward()

    Configure the plot to use y-axis upward

  setYAxisDownward()

    Configure the plot to use y-axis downward

class ProfileOptionToolButton(parent=None, plot=None)

  Button to define option on the profile

  setMethod(method)

    Set the method to use.

    Parameters:

      method (str) – Either ‘sum’ or ‘mean’

  getMethod()

    Returns the current method in use (See `setMethod()`).

    Return type:

      str

class ProfileToolButton(parent=None, plot=None)

  Button used in Profile3DToolbar to switch between 2D profile and 1D profile.

  STATE = None

    Lazy loaded states used to feed ProfileToolButton

  setDimension(dimension)

    Set the selected dimension

  getDimension()

    Get the selected dimension.

    Return type:

      int (1 or 2)

class SymbolToolButton(parent=None, plot=None)

  A tool button with a drop-down menu to control symbol size and marker.

  Parameters:

    - parent – See QWidget

    - plot – The ~silx.gui.plot.PlotWidget to control

class ScatterVisualizationToolButton(parent=None, plot=None)

  QToolButton to select the visualization mode of scatter plot

  Parameters:

    - parent – See QWidget

    - plot – The ~silx.gui.plot.PlotWidget to control