pynaviz.interval_set#

Handling of interval sets associated to base_plot classes.

Functions

get_max_interval_index(labels)

is_in_view(screen_xmin, screen_xmax, width, ...)

Compute if a rectangle is in the field of view.

Classes

IntervalSetInterface([epochs, labels])

class pynaviz.interval_set.IntervalSetInterface(epochs=None, labels=None)[source]#

Bases: object

Parameters:
add_interval_sets(epochs, colors=None, alpha=None, labels=None)[source]#
Parameters:
remove_interval_set(label)[source]#

Remove an interval set from the plot.

Parameters:

label (str) – The label of the interval set to be removed.

Return type:

None

update_interval_set(name, colors, alpha)[source]#

Update the color and transparency of an existing interval set.

Parameters:
  • name (str) – The label of the interval set to be updated.

  • colors (str | Color) – The new color of the interval set.

  • alpha (float) – The new transparency level, between 0 and 1.

Return type:

None

pynaviz.interval_set.get_max_interval_index(labels)[source]#
pynaviz.interval_set.is_in_view(screen_xmin, screen_xmax, width, rectangle)[source]#

Compute if a rectangle is in the field of view.

Parameters:
  • screen_xmin – Lower xlim of the canvas.

  • screen_xmax – Upper xlim of the canvas.

  • width – Rectangle width.

  • rectangle – A rectangle as a pygfx.Mesh.