3.2.11.3. causality/EventTracePrinter.hpp¶
3.2.11.3.1. Class 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.
The plot is rendered with the PGFPlots package similarly to the following pseudo Latex code.
\begin{tikzpicture} \begin{axis}[ % base options % options from callback ] % result of pre-content callback % for each vertex in the trace: % if the vertex is visible, according the callback \addplot+[ % base vertex options % options from vertex options callback ] table { % filename of file with data for that vertex } \addlegendentry{ % name of the graph associated with the vertex, escaped to be in math mode } % result of post-content callback \end{axis} \end{tikzpicture}
3.2.11.3.1.1. Synopsis¶
-
void setMaxPointsPerVertex(int value)
-
int getMaxPointsPerVertex() const
-
void setLogTime(bool value)
-
bool getLogTime() const
-
void setLogCount(bool value)
-
bool getLogCount() const
-
void pushOptions(std::function<std::string(std::shared_ptr<dg::DG>)> f)
-
void popOptions()
-
void pushVertexVisible(std::function<bool(dg::DG::Vertex)> f)
-
void popVertexVisible()
-
void pushVertexOptions(std::function<std::string(dg::DG::Vertex)> f)
-
void popVertexOptions()
-
void setPreContent(std::function<std::string(std::shared_ptr<dg::DG>)> f)
-
void setPostContent(std::function<std::string(std::shared_ptr<dg::DG>)> f)
3.2.11.3.1.2. Details¶
-
void setMaxPointsPerVertex(int value)¶
-
int getMaxPointsPerVertex() const¶
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.
-
void setLogTime(bool value)¶
-
bool getLogTime() const¶
Control if the time axis should be logarithmic or not. It defaults to false.
-
void setLogCount(bool value)¶
-
bool getLogCount() const¶
Control if the count axis should be logarithmic or not. It defaults to false.
Add another function or constant that adds options for the axis environment. All options function results are applied.
- Throws:
LogicError
if !f.
-
void popOptions()¶
Remove the last pushed options function.
- Throws:
LogicError
if no callback is left to pop.
-
void pushVertexVisible(std::function<bool(dg::DG::Vertex)> f)¶
Add another function controlling the visibility of vertices. All visibility functions must return true for the plot of a vertex to be visible.
- Throws:
LogicError
if !f.
-
void popVertexVisible()¶
Remove the last pushed vertex visibility function.
- Throws:
LogicError
if no callback is left to pop.
-
void pushVertexOptions(std::function<std::string(dg::DG::Vertex)> f)¶
Add another function or constant setting options for the plot of each vertex. All options function results are applied.
- Throws:
LogicError
if !f.
-
void popVertexOptions()¶
Remove the last pushed vertex options function.
- Throws:
LogicError
if no callback is left to pop.
Set a callback for adding additional content to the plot, either before or after the primary data has been added.
- Throws:
LogicError
if !f.