Regular API function

simAddGraphStream / sim.addGraphStream

Description Adds or updates a graph stream. See also the other functions related to graphs.
C synopsis simInt simAddGraphStream(simInt graphHandle,const simChar* streamName,const simChar* unitStr,simInt options,const simFloat* color,simFloat cyclicRange)
C parameters
graphHandle: handle of the graph
streamName: name of the stream
unitStr: string describing the unit of the stream. Can be nullptr
options: bit-coded: if bit0 is set (1), the stream is not visible. If bit1 is set (2), the label is not visible. If bit2 is set (4), the points are not linked.
color: rgb-triplet, with values in [0.0-1.0], indicating the color of the stream. Can be nullptr
cyclicRange: can be used with cyclic values (e.g. angles) for correct data interpretation during stream data transformation. Set to 0 if not used
C return value
-1 if operation was not successful, otherwise the id of the created/updated stream
Lua synopsis int streamId=sim.addGraphStream(int graphHandle,string streamName,string unitStr='',int options=0,table[3] color={1,0,0},cyclicRange=0)
Lua parameters
Similar to the C-function counterpart
Lua return values
Similar to the C-function counterpart