Skip to main content
`Ctrl`+`K`

# `silx.gui.plot.actions.control`

`silx.gui.plot.actions.control` provides a set of QAction relative to control of a `PlotWidget`.

The following QAction are available:

- `ColormapAction`

- `CrosshairAction`

- `CurveStyleAction`

- `GridAction`

- `KeepAspectRatioAction`

- `PanWithArrowKeysAction`

- `ResetZoomAction`

- `ShowAxisAction`

- `XAxisLogarithmicAction`

- `XAxisAutoScaleAction`

- `YAxisInvertedAction`

- `YAxisLogarithmicAction`

- `YAxisAutoScaleAction`

- `ZoomBackAction`

- `ZoomInAction`

- `ZoomOutAction`

class ResetZoomAction(plot, parent=None)

  QAction controlling reset zoom on a `PlotWidget`.

  Parameters:

    - plot – `PlotWidget` instance on which to operate

    - parent – See `QAction`

class ZoomBackAction(plot, parent=None)

  QAction performing a zoom-back in `PlotWidget` limits history.

  Parameters:

    - plot – `PlotWidget` instance on which to operate

    - parent – See `QAction`

class ZoomInAction(plot, parent=None)

  QAction performing a zoom-in on a `PlotWidget`.

  Parameters:

    - plot – `PlotWidget` instance on which to operate

    - parent – See `QAction`

class ZoomOutAction(plot, parent=None)

  QAction performing a zoom-out on a `PlotWidget`.

  Parameters:

    - plot – `PlotWidget` instance on which to operate

    - parent – See `QAction`

class XAxisAutoScaleAction(plot, parent=None)

  QAction controlling X axis autoscale on a `PlotWidget`.

  Parameters:

    - plot – `PlotWidget` instance on which to operate

    - parent – See `QAction`

class YAxisAutoScaleAction(plot, parent=None)

  QAction controlling Y axis autoscale on a `PlotWidget`.

  Parameters:

    - plot – `PlotWidget` instance on which to operate

    - parent – See `QAction`

class XAxisLogarithmicAction(plot, parent=None)

  QAction controlling X axis log scale on a `PlotWidget`.

  Parameters:

    - plot – `PlotWidget` instance on which to operate

    - parent – See `QAction`

class YAxisLogarithmicAction(plot, parent=None)

  QAction controlling Y axis log scale on a `PlotWidget`.

  Parameters:

    - plot – `PlotWidget` instance on which to operate

    - parent – See `QAction`

class GridAction(plot, gridMode='both', parent=None)

  QAction controlling grid mode on a `PlotWidget`.

  Parameters:

    - plot – `PlotWidget` instance on which to operate

    - gridMode (str) – The grid mode to use in ‘both’, ‘major’. See `PlotWidget.setGraphGrid()`

    - parent – See `QAction`

class CurveStyleAction(plot, parent=None)

  QAction controlling curve style on a `PlotWidget`.

  It changes the default line and markers style which updates all curves on the plot.

  Parameters:

    - plot – `PlotWidget` instance on which to operate

    - parent – See `QAction`

class ColormapAction(plot, parent=None)

  QAction opening a ColormapDialog to update the colormap.

  Both the active image colormap and the default colormap are updated.

  Parameters:

    - plot – `PlotWidget` instance on which to operate

    - parent – See `QAction`

  setColormapDialog(dialog)

    Set a specific colormap dialog instead of using the default one.

class ColorBarAction(plot, parent=None)

  QAction opening the ColorBarWidget of the specified plot.

  Parameters:

    - plot – `PlotWidget` instance on which to operate

    - parent – See `QAction`

class KeepAspectRatioAction(plot, parent=None)

  QAction controlling aspect ratio on a `PlotWidget`.

  Parameters:

    - plot – `PlotWidget` instance on which to operate

    - parent – See `QAction`

class YAxisInvertedAction(plot, parent=None)

  QAction controlling Y orientation on a `PlotWidget`.

  Parameters:

    - plot – `PlotWidget` instance on which to operate

    - parent – See `QAction`

class CrosshairAction(plot, color='black', linewidth=1, linestyle='-', parent=None)

  QAction toggling crosshair cursor on a `PlotWidget`.

  Parameters:

    - plot – `PlotWidget` instance on which to operate

    - color (str) – Color to use to draw the crosshair

    - linewidth (int) – Width of the crosshair cursor

    - linestyle (str) – Style of line. See `Plot.setGraphCursor()`

    - parent – See `QAction`

  color

    Color used to draw the crosshair (str).

  linewidth

    Width of the crosshair cursor (int).

  linestyle

    Style of line of the cursor (str).

class PanWithArrowKeysAction(plot, parent=None)

  QAction toggling pan with arrow keys on a `PlotWidget`.

  Parameters:

    - plot – `PlotWidget` instance on which to operate

    - parent – See `QAction`

class ShowAxisAction(plot, parent=None)

  QAction controlling axis visibility on a `PlotWidget`.

  Parameters:

    - plot – `PlotWidget` instance on which to operate

    - parent – See `QAction`

class ClosePolygonInteractionAction(plot, parent=None)

  QAction controlling closure of a polygon in draw interaction mode if the `PlotWidget`.

  Parameters:

    - plot – `PlotWidget` instance on which to operate

    - parent – See `QAction`

class OpenGLAction(plot, parent=None)

  QAction controlling rendering of a `PlotWidget`.

  For now it can enable or not the OpenGL backend.

  Parameters:

    - plot – `PlotWidget` instance on which to operate

    - parent – See `QAction`