casys.visualization.events

Plot events related classes.

Functions

copy(x)

Shallow copy operation on arbitrary Python objects.

Classes

Any(*args, **kwargs)

Special type indicating an unconstrained type.

CasysEvent([start, label, params])

Representation of an event that can be added to CasysPlot data.

RangeEvent([start, label, params, end])

Temporal range Representation of an event that can be added to CasysPlot data.

SimpleEvent([start, label, params])

Representation of an event that can be added to CasysPlot data.

class casys.visualization.events.CasysEvent(start=None, label=<factory>, params=<factory>)

Bases: ABC

Representation of an event that can be added to CasysPlot data.

Parameters:
draw_event(ax)

Draw the event on the provided axe.

Parameters:

ax (Axes) – Matplotlib on which to draw the event.

Return type:

list[Artist]

Returns:

List of drawn artists.

abstract is_in(ax, params)

Check if the event is in the graph axe limits.

Parameters:
Return type:

bool

label: str | dict[str, Any] | None
property label_params: dict[str, Any]
params: dict[str, Any]
start: float | DateHandler | None = None
class casys.visualization.events.RangeEvent(start=None, label=<factory>, params=<factory>, end=None)

Bases: CasysEvent

Temporal range Representation of an event that can be added to CasysPlot data.

Parameters:
draw_event(ax)

Draw the event on the provided axe.

Parameters:

ax (Axes) – Matplotlib on which to draw the event.

Return type:

list[Artist]

Returns:

List of drawn artists.

end: float | DateHandler | None = None
is_in(ax, params)

Check if the event is in the graph axe limits.

Parameters:
label: str | dict[str, Any] | None
property label_params: dict[str, Any]
params: dict[str, Any]
start: float | DateHandler | None = None
class casys.visualization.events.SimpleEvent(start=None, label=<factory>, params=<factory>)

Bases: CasysEvent

Representation of an event that can be added to CasysPlot data.

Parameters:
draw_event(ax)

Draw the event on the provided axe.

Parameters:

ax (Axes) – Matplotlib on which to draw the event.

Return type:

list[Artist]

Returns:

List of drawn artists.

is_in(ax, params)

Check if the event is in the graph axe limits.

Parameters:
label: str | dict[str, Any] | None
property label_params: dict[str, Any]
params: dict[str, Any]
start: float | DateHandler | None = None