4.1.8.3. causality/EventTracePrinter

class causality.EventTracePrinter

This class is used to configure how event traces are visualised, e.g., which vertices/graphs should be shown, colours, and axis configuration.

See causality::EventTracePrinter for details on how the plot is rendered, and how the rendering is influenced by the printer.

maxPointsPerVertex

Control how many points are rendered for each different vertex represented in the trace. Data is then visualised at this amount of regular intervals on the time axis. It defaults to 500.

Type:

int

logTime

Control if the time axis should be logarithmic or not. It defaults to false.

Type:

bool

logCount

Control if the count axis should be logarithmic or not. It defaults to false.

Type:

bool

pushOptions(f)

Add another function or constant that adds options for the axis environment. All options function results are applied.

Parameters:

f (Callable[[DG], str] or str) – the function or constant to push for specifying options.

popOptions()

Remove the last pushed options function.

Raises:

LogicError if no callback is left to pop.

pushVertexVisible(f)

Add another function or constant controlling the visibility of plots of vertices. All visibility functions must return true for a plot of a vertex to be visible.

Parameters:

f (Callable[[DG.Vertex], bool] or bool) – the function or constant to push for specifying vertex visibility.

popVertexVisible()

Remove the last pushed vertex visibility function.

Raises:

LogicError if no callback is left to pop.

pushVertexOptions(f)

Add another function or constant setting options for the plot of each vertex. All options function results are applied.

Parameters:

f (Callable[[DG.Vertex], str] or str) – the function or constant to push for specifying vertex options.

popVertexOptions()

Remove the last pushed vertex options function.

Raises:

LogicError if no callback is left to pop.

setPreContent(f)
setPostContent(f)

Set a callback for adding additional content to the plot, either before or after the primary data has been added.

Parameters:

f (Callable[[DG.Vertex], str] or str) – the function or constant to set for adding content.