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: Iterable[IntervalSet] | IntervalSet | None = None, labels: Iterable[str] | str | None = None)[source]#

Bases: object

add_interval_sets(epochs: Iterable[IntervalSet] | IntervalSet, colors: Iterable | str | Color | None = None, alpha: Iterable[float] | float | None = None, labels: Iterable[str] | str | None = None)[source]#
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.