Skip to main content
`Ctrl`+`K`

# `Profile`: Toolbars with profile tools

Utility functions, toolbars and actions to create profile on images and stacks of images

## `ProfileToolBar` class

class ProfileToolBar(parent=None, plot=None, profileWindow=None)

  Bases: `QToolBar`

  QToolBar providing profile tools operating on a `PlotWindow`.

  Attributes:

  - plot: Associated `PlotWindow` on which the profile line is drawn.

  - actionGroup: `QActionGroup` of available actions.

  To run the following sample code, a QApplication must be initialized. First, create a PlotWindow and add a `ProfileToolBar`.

      >>> from silx.gui.plot import PlotWindow
      >>> from silx.gui.plot.Profile import ProfileToolBar

      >>> plot = PlotWindow()  # Create a PlotWindow
      >>> toolBar = ProfileToolBar(plot=plot)  # Create a profile toolbar
      >>> plot.addToolBar(toolBar)  # Add it to plot
      >>> plot.show()  # To display the PlotWindow with the profile toolbar

  Parameters:

    - plot – `PlotWindow` instance on which to operate.

    - profileWindow – Plot widget instance where to display the profile curve or None to create one.

    - parent – See `QToolBar`.

  getPlotWidget()

    The `PlotWidget` associated to the toolbar.

  getProfileManager()

    Return the manager of the profiles.

    Return type:

      ProfileManager

  clearProfile()

    Remove profile curve and profile area.

## `Profile3DToolBar` class

class Profile3DToolBar(parent=None, stackview=None)

  Bases: `ProfileToolBar`

  stackView

    `StackView` instance