Reference

Base classes

class plotpy.styles.base.ItemParameters(multiselection: bool = False)[source]

Class handling QwtPlotItem-like parameters

Parameters:

multiselection (bool) – if True, the class will handle

classmethod register_multiselection(klass, klass_ms)[source]

Register a DataSet couple: (DataSet, DataSet_for_MultiSelection)

add(key: str, item: IBasePlotItem, param: guidata.dataset.DataSet) None[source]

Add parameters for a given item

Parameters:
  • key – key to identify the item

  • item – item to be customized

  • param – parameters to be applied to the item

get(key: str) guidata.dataset.DataSet[source]

Get parameters for a given item

Parameters:

key – key to identify the item

update(plot: BasePlot) None[source]

Update plot items according to the parameters

Parameters:

plot – plot to be updated

edit(plot: BasePlot, title: str, icon: str) None[source]

Edit parameters

Parameters:
  • plot – plot to be updated

  • title – title of the dialog

  • icon – icon of the dialog

Plot (grid, axes)

class plotpy.styles.GridParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]
update_param(grid)[source]
Parameters:

grid

update_grid(grid)[source]
Parameters:

grid

class plotpy.styles.AxesParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]

Parameters for the axes of a plot.

update_param(item: QwtPlotItem) None[source]

Update the parameters of the axes.

Parameters:

item – The plot item from which to update the parameters.

update_item(item: QwtPlotItem) None[source]

Update the axes with the parameters.

Parameters:

item – The plot item to update.

class plotpy.styles.ImageAxesParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]

Parameters for the axes of an image plot.

update_param(item: BaseImageItem) None[source]

Update the parameters of the axes associated with the image item.

Parameters:

item – The image item from which to update the parameters.

update_item(item: BaseImageItem) None[source]

Update the axes with the parameters associated with the image item.

Parameters:

item – The image item to update.

Curve items

class plotpy.styles.CurveParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]

Dataset defining the parameters of a CurveItem

update_param(curve: CurveItem) None[source]

Updates the parameters using values from a given CurveItem

Parameters:

curve – reference CurveItem instance

update_item(curve: CurveItem) None[source]

Updates a given CurveItem using the current parameters

Parameters:

curve – instance of CurveItem to update

class plotpy.styles.ErrorBarParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]

Error bar style parameters for a curve.

update_param(item: ErrorBarCurveItem) None[source]

Update the parameters associated with the error bar item.

Parameters:

item – The error bar item from which to update the parameters.

update_item(item: ErrorBarCurveItem) None[source]

Update the error bar item with the parameters.

Parameters:

item – The error bar item to update.

Image items

class plotpy.styles.RawImageParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]

Parameters for a raw image.

update_param(item: RawImageItem) None[source]

Update the parameters from the given image item.

Parameters:

item – The image item from which to update the parameters.

update_item(item: RawImageItem) None[source]

Update the given image item from the parameters.

Parameters:

item – The image item to update.

class plotpy.styles.ImageParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]

Parameters for an image.

update_param(item: ImageItem) None[source]

Update the parameters from the given image item.

Parameters:

item – The image item from which to update the parameters.

update_item(item: ImageItem) None[source]

Update the given image item from the parameters.

Parameters:

item – The image item to update.

class plotpy.styles.TrImageParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]

Parameters for a transformed image.

update_param(item: TrImageItem) None[source]

Update the parameters from the given image item.

Parameters:

item – The image item from which to update the parameters.

update_item(item: TrImageItem) None[source]

Update the given image item from the parameters.

Parameters:

item – The image item to update.

get_transform() tuple[float, float, float, float, float, bool, bool][source]

Get the transformation parameters.

Returns:

x0, y0, angle, dx, dy, hflip, vflip.

Return type:

The transformation parameters

set_transform(x0: float, y0: float, angle: float, dx: float = 1.0, dy: float = 1.0, hflip: bool = False, vflip: bool = False) None[source]

Set the transformation parameters.

Parameters:
  • x0 – The x-coordinate of the center of the image.

  • y0 – The y-coordinate of the center of the image.

  • angle – The rotation angle in degrees.

  • dx – The width of the image.

  • dy – The height of the image.

  • hflip – Flip the image horizontally.

  • vflip – Flip the image vertically.

set_crop(left: int, top: int, right: int, bottom: int) None[source]

Set the crop parameters.

Parameters:
  • left – The left crop.

  • top – The top crop.

  • right – The right crop.

  • bottom – The bottom crop.

get_crop() tuple[int, int, int, int][source]

Get the crop parameters.

Returns:

left, top, right, bottom.

Return type:

The crop parameters

class plotpy.styles.XYImageParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]

Parameters for an XY image.

class plotpy.styles.RGBImageParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]

Parameters for an RGB image.

update_item(item: RGBImageItem) None[source]

Update the given image item from the parameters.

Parameters:

item – The image item to update.

class plotpy.styles.MaskedImageParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]

Parameters for a masked image.

update_item(item: MaskedImageItem) None[source]

Update the given image item from the parameters.

Parameters:

item – The image item to update.

class plotpy.styles.MaskedXYImageParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]

Parameters for a masked XY image.

update_item(item: MaskedXYImageItem) None[source]

Update the given image item from the parameters.

Parameters:

item – The image item to update.

class plotpy.styles.ImageFilterParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]

Parameters for an image filter.

update_param(item: ImageFilterItem) None[source]

Update the parameters from the given image filter item.

Parameters:

item – The image filter item from which to update the parameters.

update_imagefilter(item: ImageFilterItem) None[source]

Update the given image filter item from the parameters.

Parameters:

item – The image filter item to update.

class plotpy.styles.QuadGridParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]

Parameters for the grid of a quad item.

update_param(item: BaseImageItem) None[source]

Update the parameters from the given image item.

Parameters:

item – The image item to update the parameters from.

update_item(item: BaseImageItem) None[source]

Update the given image item from the parameters.

Parameters:

item – The image item to update.

Histogram items

class plotpy.styles.HistogramParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]
update_param(item: HistogramItem) None[source]

Update the histogram parameters from the plot item

Parameters:

item – Histogram item

update_hist(item: HistogramItem) None[source]

Update the histogram plot item from the parameters

Parameters:

item – Histogram item

class plotpy.styles.Histogram2DParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]

Histogram

update_param(item: Histogram2DItem) None[source]

Update the histogram parameters from the plot item

Parameters:

item – 2D Histogram item

update_histogram(item: Histogram2DItem) None[source]

Update the histogram plot item from the parameters

Parameters:

item – 2D Histogram item

Shape items

class plotpy.styles.LabelParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]

Parameters for a label item.

update_param(item: LabelItem) None[source]

Update the parameters associated with the label item.

Parameters:

item – The label item from which to update the parameters.

update_item(item: LabelItem) None[source]

Update the label item with the parameters.

Parameters:

item – The label item to update.

class plotpy.styles.LegendParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]

Parameters for a legend box item.

update_item(item: LegendBoxItem) None[source]

Update the legend item with the parameters.

Parameters:

item – The legend item to update.

class plotpy.styles.ShapeParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]

Parameters for a shape item

update_param(obj: PolygonShape) None[source]

Update parameters from object

Parameters:

obj – Shape object

update_item(item: PolygonShape) None[source]

Update object from parameters

Parameters:

item – Shape object

class plotpy.styles.AnnotationParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]

Parameters for annotations

update_param(obj: AnnotatedShape) None[source]

Update parameters from object

Parameters:

obj – AnnotatedShape object

update_item(item: AnnotatedShape) None[source]

Update object from parameters

Parameters:

obj – AnnotatedShape object

class plotpy.styles.AxesShapeParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]

Parameters for an axes item

update_param(item: Axes) None[source]

Update parameters from object

Parameters:

obj – Axes object

update_item(item: Axes) None[source]

Update object from parameters

Parameters:

obj – Axes object

class plotpy.styles.RangeShapeParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]

Parameters for a range selection item

update_param(obj: XRangeSelection) None[source]

Update parameters from object

Parameters:

obj – XRangeSelection object

update_item(item: XRangeSelection) None[source]

Update object from parameters

Parameters:

range – XRangeSelection object

class plotpy.styles.MarkerParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]

Parameters for a marker item

update_param(obj: Marker) None[source]

Update parameters from object

Parameters:

obj – Marker object

update_item(item: Marker) None[source]

Update object from parameters

Parameters:

item – Marker object

set_markerstyle(style: None | str | int) None[source]

Set marker line style

Parameters:

style – line style. It can be one of the following: * convenient values: ‘+’, ‘-’, ‘|’ or None * QwtPlotMarker.NoLine, QwtPlotMarker.Vertical, …

class plotpy.styles.FontParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]
update_param(font)[source]
Parameters:

font

build_font()[source]
Returns:

class plotpy.styles.SymbolParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]
update_param(symb)[source]
Parameters:

symb

Returns:

build_symbol()[source]
Returns:

update_symbol(obj)[source]
Parameters:

obj

class plotpy.styles.LineStyleParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]
update_param(pen)[source]
Parameters:

pen

build_pen()[source]
Returns:

set_style_from_matlab(linestyle)[source]

Eventually convert MATLAB-like linestyle into Qt linestyle

class plotpy.styles.BrushStyleParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]
update_param(brush)[source]
Parameters:

brush

build_brush()[source]
Returns:

class plotpy.styles.TextStyleParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]
update_param(obj)[source]

obj: QwtText instance

update_text(obj)[source]

obj: QwtText instance