plopp.backends.plotly.line.Line#

class plopp.backends.plotly.line.Line(canvas, data, uid=None, artist_number=0, errorbars=True, mask_color='black', mode=None, marker=None, **kwargs)[source]#

Artist to represent one-dimensional data. If the coordinate is bin centers, the line is (by default) a set of markers. If the coordinate is bin edges, the line is a step function.

Parameters:
  • canvas (Canvas) – The canvas that will display the line.

  • data (DataArray) – The initial data to create the line from.

  • uid (Optional[str], default: None) – The unique identifier of the artist. If None, a random UUID is generated.

  • artist_number (int, default: 0) – The canvas keeps track of how many lines have been added to it. This number is used to set the color and marker parameters of the line.

  • errorbars (bool, default: True) – Show errorbars if True.

  • mask_color (str, default: 'black') – The color to be used to represent the masks.

  • mode (Optional[str], default: None) – The mode of the line, either ‘markers’ or ‘lines’.

  • marker (Optional[str], default: None) – The marker style to use.

__init__(canvas, data, uid=None, artist_number=0, errorbars=True, mask_color='black', mode=None, marker=None, **kwargs)[source]#

Methods

__init__(canvas, data[, uid, artist_number, ...])

bbox(xscale, yscale)

The bounding box of the line.

remove()

Remove the line, masks and errorbar artists from the canvas.

update(new_values)

Update the x and y positions of the data points from new data.

Attributes

color

The line color.

marker

The marker style.

opacity

The opacity of the line.

style

The line style.

visible

The visibility of the line.

width

The line width.