SignalGraphic

report_signalgraphic TPTReport.SignalGraphic([signal[] signals])

This function generates a signal graphics.

Parameters:

[signals] (optional) Optional list of signals that should be part of the graphics initially. This parameter is optional. If omitted no signals will be added to the graphics initially.

Returns:

the signal graphics that can be added to report

Examples:

   from math import sin;
   
   # create example signals
   mysin = TPT.Double();
   mybool = TPT.Boolean();
   mysin(t) := t < 7s ? sin(t) : 0.2;
   mybool(t) := t % 2 < 0.3;
   
   # create a signal graphic
   sg = TPTReport.SignalGraphic();
   sg.add(mybool);
   sg.add(mysin);
   sg.setBooleanSize(900,80); # ensure that boolean signals are drawn with height = 80px
   sg.setOneGraphPerSignal(true); # isolate the signals (one graphic per signal)
   TPTReport.add(sg); # add the graphics to the report