Grapher
Purpose
Description
Example
Tips
Macro Synopsis
Modules
Related Functions
Purpose
Graphically display a signal (Macro only)
Description
"Grapher" displays one or more signals in a separate
window. Besides the signal(s) to be displayed, "Grapher" takes an
additional string parameter that may contain the following display options
(also tunable by the Dataplore ® "Child settings..."
context menu):
- float fromX determines the smallest x-axis value to be displayed
- float toX determines the largest x-axis value to be displayed
- float fromY determines the smallest y-axis value to be displayed
- float toY determines the largest y-axis value to be displayed
- int drawWidth determines the line or dot width in pixels
- int lineType is one of the following line types:
"line", "line-point", "point", "line-dash",
"pulse", "bar", "steps", "stem", "boxes", "box-bar", "density", "contour"
- int pointType is one of the following point types:
"dot", "rectangle", "triangle", "filled rectangle", "filled triangle", "plus", "cross", "circle", "triangle down", "filled triangle down"
- int colour determines the line or dot colour by its index (ranging from 0 to 127) in the colour map
- int bgColour sets the background colour (same colours as for lines)
- int bgColourArea sets the background area colour (same colours as for lines)
- bool grid triggers the display of an additional x-y grid within the
signal window (default is "off")
- bool gridX triggers the display of an x-axis grid within the signal window (default is "off")
- bool gridY triggers the display of a y-axis grid within the signal window (default is "off")
- bool logY uses a logarithmic (instead of a linear) scale for
the y-axis (default is "off")
- bool logX uses a logarithmic (instead of a linear) scale for
the x-axis (default is "off")
- bool frame draws a frame around the signal window (default is "off")
- bool centerX displays the x-axis at y=0 (default is "off")
- bool capture always displays the signal within the maximum
and minimum value ranges of the signal, even if a larger region
has been selected by fromX or toY. (default is "on")
- bool showTitle uses the title(s) of the given signal(s) as signal
window title (default is "on")
- float logBaseX determines the logarithm base for logX
(must be greater than 1)
- float logBaseY determines the logarithm base for logY
(must be greater than 1)
- string formatX determines the numerical format of the values along
the x-axis
- string formatY determines the numerical format of the values along
the y-axis
- int axisWidth determines the axis width in pixels
- int axisColour determines the axis colour (see colour)
- int width determines the width of the signal window in pixels
- int height determines the height of the signal window in pixels
Note that all parameters are optional, but at least an empty string
must be given. The individual variables within the string parameter
are separated by commata and can appear in arbitrary order for each
signal given. For multi-channel signals, the variables are assigned to the channels in the order they are given. Parameters of different signals are separated by semicolons. lineType and pointType variables can also be given as the indices of the respective types, counting from 0 in the order shown above.
Warning: If boolean variables are defined multiply for "Grapher", only the
last one will be regarded.
If more than one signal is to be displayed, all signals must be of the
same type.
Example
If you want the signal x to be displayed on a grid canvas
with a logarithmic scale of the y-axis and a frame around the signal
window with a size of 300 x 400 pixels, use
Grapher(x, "grid=true, logY=true, frame=true, width=300, height=400");
Another example for multiple signals x1, x2 and x3, each displayed in
another colour and another line type, where x1 is a two-channel signal:
Grapher([x1,x2,x3], "colour=0, colour=1, lineType=line, lineType=line; colour=13, lineType=line-point, pointType=cross; colour=127, lineType=line-dash");
Tips
Font styles and colourmaps can be selected globally.
Macro Synopsis
Grapher([x1,x2,...,xn],s);
signal x1,x2,xn;
string s;
Modules
Basic
Related Functions
GrapherMix, GrapherScroll