class StripChart

Strip-chart display class.

Public Classes

enum AxisType
X-Axis display format
kNone
No horizontal axis
kNumber
Pure number
kGMTime
Grenwich Mean Time
kLocalTime
Local Time

Public Methods

StripChart(int nPen=0, const char* Title=0)
Create a new strip chart.
StripChart(int nPen, TPad* canvas)
Create a new strip chart
~StripChart()
Destroy a strip chart
bool getLogY(int p) const
Get vertical scale mode
XAxis_t getMaxX(void) const
X axis maximum
XAxis_t getMinX(void) const
X axis minimum
int getN(void) const
History length
void setAxisType(enum AxisType mode)
Set auto-scroll mode
void setAutoScroll(bool smode=true)
Set auto-scroll mode
void setBias(int p, float bias)
Set the normalization bias for pen 'p'
void setColor(int p, const char* color)
Set pen color
void setColor(int p, int color)
Set pen color
void setLogY(int p, bool logy)
Set pen vertical mode
void setLogY(bool logy)
Set vertical mode for all pens
void setMaxX(XAxis_t xmax)
Set the initial x-axis maximum
void setMaxY(float ymax)
Set the y-axis maximum
void setMinX(XAxis_t xmin)
Set the initial x-axis minimum
void setMinY(float ymin)
Set the initial y-axis minimum
void setN(int N)
Set the number of history elements
void setNPen(int N)
Set the number of pens.
void setScale(int p, float scale)
Set the normalization scale
void setScroll(float scrolmin)
Set the minimum scroll distance
void setShowNames(bool show)
Show pen names.
void setStripe(int p, float Center, float hWidth)
Set normalization transform for one pen
void setTitle(int p, const char* title)
Define a pen title
void scroll(float dT)
Scroll the chart
void plot(XAxis_t x, const float* y)
Plot a time point
void redraw(void)
Re-Draw the strip-chart

Documentation

The strip-chart class displays N series of data points that vary with the same x (time) spacing. An arbitrary number of data series (pens) may be displayed over an arbitrary interval. The pens are numbered from 0 to nPen-1. Each strip chart object is displayed on a separate root TCanvas created and controlled by the object.
enum AxisType
X-Axis display format. AxisTYpe enumerates the x-axis display formats.

kNone
No horizontal axis

kNumber
Pure number

kGMTime
Grenwich Mean Time

kLocalTime
Local Time

StripChart(int nPen=0, const char* Title=0)
A strip chart is created with 'nPen' pens. A new canvas is created with title 'Title'.
Parameters:
nPen - Number of pens on the strip chart.
Title - optional title to be given to the created canvas.

StripChart(int nPen, TPad* canvas)
Create a new strip chart. A strip chart is created with 'nPen' pens on the specified Pad.

~StripChart()
Destroy a strip chart. The strip chart is destroyed and its display is removed.

bool getLogY(int p) const
Get vertical scale mode. getLogY() returns true if the vertical scale of pen 'p' is logarithmic and false if it is linear.

XAxis_t getMaxX(void) const
X axis maximum. getMaxX() returns the current upper limit of the x axis.

XAxis_t getMinX(void) const
X axis minimum. getMinX() returns the current lower limit of the x axis.

int getN(void) const
History length. getN() returns the number of entries per pen in the strip chart history buffer.

void setAxisType(enum AxisType mode)
Set auto-scroll mode. If auto-scroll is set, the x-axis of the chart will be pushed forward whenever a point with x > x-Max is plotted. The minimum scroll distance is set by set-Scroll().

void setAutoScroll(bool smode=true)
Set auto-scroll mode. If auto-scroll is set, the x-axis of the chart will be pushed forward whenever a point with x > x-Max is plotted. The minimum scroll distance is set by set-Scroll().

void setBias(int p, float bias)
Set the normalization bias for pen 'p'. Before they are plotted, the pen data are normalized to fit within a horizontal stripe. A linear normalization transformation is used i.e. Ynorm[i] = Scale * Y[i] + Bias. By default the scale is set to 0.5/nPen and the bias is set to (p + 0.5)/nPen so that nPen signals with -1.0 < Y[i] <1.0 will fit on a Plot with Ymin=0 and Ymax=1.0.

void setColor(int p, const char* color)
Set pen color. Pen 'p' is set to the named color.

void setColor(int p, int color)
Set pen color. Pen 'p' is set to the specified color index.

void setLogY(int p, bool logy)
Set pen vertical mode. The vertical scale mode of pen 'p' is set to logarithmic (if log=true) or linear (if log=false).

void setLogY(bool logy)
Set vertical mode for all pens. The vertical mode for all defined pens is set to logarithmic (if logy=true) or linear (if logy=false). All pens created after this function is called will initially have the same mode.

void setMaxX(XAxis_t xmax)
Set the initial x-axis maximum. The x-axis upper limit (mXmax) is set to the specified value. mXmax defaults to 1000.

void setMaxY(float ymax)
Set the y-axis maximum. The y-axis upper limit (mYmax) is set to the specified value. mYmax defaults to 1.

void setMinX(XAxis_t xmin)
Set the initial x-axis minimum. The x-axis lower limit (mXmin) is set to the specified value. mXmin defaults to 0.

void setMinY(float ymin)
Set the initial y-axis minimum. The y-axis lower limit (mYmin) is set to the specified value. mYmin defaults to 0.

void setN(int N)
Set the number of history elements. All pens are reallocated with the specified number of entries in the history list. All pen information including the current history, the specified color, etc. are lost.

void setNPen(int N)
The number of pens is set to 'N'. If N is larger than the current number of pens, new pens are added. If N is less than the current number, the high-numbered pens are deleted.

void setScale(int p, float scale)
Set the normalization scale. The normalization scale for pen 'p' is set to 'scale'. See the description setBias() for a discussion of the normalization transform.

void setScroll(float scrolmin)
Set the minimum scroll distance. Specify the minimum scrolling distance as a fraction of the x-axis length. If auto-scroll is enabled, the x-axis will be scrolled by this distance when a point is plotted beyond the current limits. This is also used as a minimum distance if scrolling is requested explicitly.

void setShowNames(bool show)
Select whether the pen names will be displayed. If the flag is set, any pen titles will be displated at the left hand side of the pen trace position. If the flag is cleared the Chart is extended to the almost te edge of the canvas.
Parameters:
show - if true the pen titles will be displayed

void setStripe(int p, float Center, float hWidth)
Set normalization transform for one pen. The normalization transform for pen 'p' is set to map a symmetric band centered at 'Center' and with half-width 'hWidth' into the 'p'th of nPen equal-sized horizontal stripes on the strip chart. See setBias() for a discussion of the normalization transform.

void setTitle(int p, const char* title)
Define a pen title. Define a title for the specified pen.

void scroll(float dT)
Scroll the chart. Scroll the strip-chart forward by 'dT' units in x. The width of the chart is maintained.

void plot(XAxis_t x, const float* y)
Plot a time point. The nPen values in y[] are plotted at 'x'.

void redraw(void)
Re-Draw the strip-chart. The strip chart is re-displayed with any new settings.


This class has no child classes.
Author:
J. Zweizig
Version:
1.2; Modified: October 11, 1999

alphabetic index hierarchy of classes


generated by doc++