Debian Codegraph @

man/stripchart.mann

raw ◀ ▶
1 Debian patch touch this file
•1 '\"
2 '\" Copyright 1991-1997 by Bell Labs Innovations for Lucent Technologies.
3 '\"
4 '\" Permission to use, copy, modify, and distribute this software and its
5 '\" documentation for any purpose and without fee is hereby granted, provided
6 '\" that the above copyright notice appear in all copies and that both that the
7 '\" copyright notice and warranty disclaimer appear in supporting documentation,
8 '\" and that the names of Lucent Technologies any of their entities not be used
9 '\" in advertising or publicity pertaining to distribution of the software
10 '\" without specific, written prior permission.
11 '\"
12 '\" Lucent Technologies disclaims all warranties with regard to this software,
13 '\" including all implied warranties of merchantability and fitness. In no event
14 '\" shall Lucent Technologies be liable for any special, indirect or
15 '\" consequential damages or any damages whatsoever resulting from loss of use,
16 '\" data or profits, whether in an action of contract, negligence or other
17 '\" tortuous action, arising out of or in connection with the use or performance
18 '\" of this software.
19 '\"
20 '\" Stripchart widget created by Sani Nassif and George Howlett.
21 '\"
22 .so man.macros
23 .TH stripchart n BLT_VERSION BLT "BLT Built-In Commands"
24 .BS
25 '\" Note: do not modify the .SH NAME line immediately below!
26 .SH NAME
27 stripchart \- 2D strip chart for plotting x and y coordinate data.
28 .SH SYNOPSIS
29 \fBstripchart\fI \fIpathName \fR?\fIoption value\fR?...
30 .BE
31 .SH DESCRIPTION
32 The \fBstripchart\fR command creates a strip chart for plotting
33 two-dimensional data (x,y coordinates). It has many configurable
34 components: coordinate axes, elements, legend, grid lines, cross
35 hairs, etc. They allow you to customize the look and feel of the
36 strip chart.
37 .PP
38 The \fBstripchart\fR is essentially the same as the \fBgraph\fR
39 widget. It works almost exactly the very same way.
40 .PP
41 The use of a strip chart differs in that the X-axis typically refers
42 to time points. Data values are added at intervals. The strip chart
43 lets you automatically maintain a view of the most recent time points.
44 The axis options \fB\-shiftby\fR and \fB\-autorange\fR control this.
45 You can specify different line styles for data points (see the
46 \fB\-styles\fR option).
47 .SH INTRODUCTION
48 The \fBstripchart\fR command creates a new window for plotting
49 two-dimensional data (x,y coordinates). Data points are plotted in a
50 box displayed in the center of the new window. This is the
51 \fIplotting area\fR. The coordinate axes are displayed in the
52 margins around the plotting area. By default, the legend is displayed
53 in the right margin. The title is displayed in top margin.
54 .PP
55 A strip chart is composed of several components: coordinate axes, data
56 elements, legend, grid, cross hairs, pens, postscript, and annotation
57 markers.
58 .TP 1i
59 \fBaxis\fR
60 The stripchart widget can display up to four coordinate axes (two
61 X-coordinate and two Y-coordinate axes), but you can create and use
62 any number of axes. Axes control what region of data is displayed and
63 how the data is scaled. Each axis consists of the axis line, title,
64 major and minor ticks, and tick labels. Tick labels display the value
65 of each major tick.
66 .TP 1i
67 \fBcrosshairs\fR
68 Cross hairs are used to finely position the mouse pointer in relation
69 to the coordinate axes. Two perpendicular lines are drawn across the
70 plotting area, intersecting at the current location of the mouse
71 pointer.
72 .TP 1i
73 \fBelement\fR
74 An element represents a set of data points. Elements can be plotted
75 with a symbol at each data point and lines connecting the points.
76 The appearance of the element, such as its symbol, line width, and
77 color is configurable.
78 .TP 1i
79 \fBgrid\fR
80 Extends the major and minor ticks of the X\-axis and/or Y\-axis across the
81 plotting area.
82 .TP 1i
83 \fBlegend\fR
84 The legend displays the name and symbol of each data element.
85 The legend can be drawn in any margin or in the plotting area.
86 .TP 1i
87 \fBmarker\fR
88 Markers are used annotate or highlight areas of the graph. For
89 example, you could use a polygon marker to fill an area under a
90 curve, or a text marker to label a particular data point. Markers
91 come in various forms: text strings, bitmaps, connected line
92 segments, images, polygons, or embedded widgets.
93 .TP 1i
94 \fBpen\fR
95 Pens define attributes (both symbol and line style) for elements.
96 Data elements use pens to specify how they should be drawn. A data
97 element may use many pens at once. Here, the particular pen
98 used for a data point is determined from each element's weight
99 vector (see the element's \fB\-weight\fR and \fB\-style\fR options).
100 .TP 1i
101 \fBpostscript\fR
102 The widget can generate encapsulated PostScript output. This component
103 has several options to configure how the PostScript is generated.
104 .SH SYNTAX
105 .DS
106 \fBstripchart \fIpathName \fR?\fIoption value\fR?...
107 .DE
108 The \fBstripchart\fR command creates a new window \fIpathName\fR and makes
109 it into a \fBstripchart\fR widget. At the time this command is invoked, there
110 must not exist a window named \fIpathName\fR, but \fIpathName\fR's
111 parent must exist. Additional options may may be specified on the
112 command line or in the option database to configure aspects of the
113 strip chart such as its colors and font. See the \fBconfigure\fR operation
114 below for the exact details as to what \fIoption\fR and \fIvalue\fR
115 pairs are valid.
116 .PP
117 If successful, \fBstripchart\fR returns the path name of the widget. It
118 also creates a new Tcl command by the same name. You can use this
119 command to perform various operations that query or modify the graph.
120 The general form is:
121 .DS
122 \fIpathName \fIoperation\fR \fR?\fIarg\fR?...
123 .DE
124 Both \fIoperation\fR and its arguments determine the exact behavior of
125 the command. The operations available for the strip chart are described in
126 the
127 .SB "STRIPCHART OPERATIONS"
128 section.
129 .PP
130 The command can also be used to access components of the strip chart.
131 .DS
132 \fIpathName component operation\fR ?\fIarg\fR?...
133 .DE
134 The operation, now located after the name of the component, is the
135 function to be performed on that component. Each component has its own
136 set of operations that manipulate that component. They will be
137 described below in their own sections.
138 .SH EXAMPLE
139 The \fBstripchart\fR command creates a new strip chart.
140 .CS
141 # Create a new strip chart. Plotting area is black.
142 stripchart .s -plotbackground black
143 .CE
144 A new Tcl command \fB.s\fR is also created. This command can be used
145 to query and modify the strip chart. For example, to change the title of
146 the strip chart to "My Plot", you use the new command and the widget's
147 \fBconfigure\fR operation.
148 .CS
149 # Change the title.
150 \&.s configure \-title "My Plot"
151 .CE
152 A strip chart has several components. To access a particular component you
153 use the component's name. For example, to add data elements, you use
154 the new command and the \fBelement\fR component.
155 .CS
156 # Create a new element named "line1"
157 \&.s element create line1 \\
158 \-xdata { 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 } \\
159 \-ydata { 26.18 50.46 72.85 93.31 111.86 128.47 143.14
160 155.85 166.60 175.38 }
161 .CE
162 The element's X and Y coordinates are specified using lists of
163 numbers. Alternately, BLT vectors could be used to hold the X\-Y
164 coordinates.
165 .CS
166 # Create two vectors and add them to the strip chart.
167 vector xVec yVec
168 xVec set { 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 }
169 yVec set { 26.18 50.46 72.85 93.31 111.86 128.47 143.14 155.85
170 166.60 175.38 }
171 \&.s element create line1 \-xdata xVec \-ydata yVec
172 .CE
173 The advantage of using vectors is that when you modify one, the graph
174 is automatically redrawn to display the new values.
175 .CS
176 # Change the X\-Y coordinates of the first point.
177 set xVec(0) 0.18
178 set yVec(0) 25.18
179 .CE
180 An element named \fBline1\fR is now created in \fB.s\fR. By
181 default, the element's label in the legend will be also \fBline1\fR.
182 You can change the label, or specify no legend entry, again using the
183 element's \fBconfigure\fR operation.
184 .CS
185 # Don't display "line1" in the legend.
186 \&.s element configure line1 -label ""
187 .CE
188 You can configure more than just the element's label. An element has
189 many attributes such as symbol type and size, dashed or solid lines,
190 colors, line width, etc.
191 .CS
192 \&.s element configure line1 -symbol square -color red \\
193 -dashes { 2 4 2 } -linewidth 2 -pixels 2c
194 .CE
195 Four coordinate axes are automatically created: \fBx\fR, \fBx2\fR,
196 \fBy\fR, and \fBy2\fR. And by default, elements are mapped onto the
197 axes \fBx\fR and \fBy\fR. This can be changed with the \fB\-mapx\fR
198 and \fB\-mapy\fR options.
199 .CS
200 # Map "line1" on the alternate Y-axis "y2".
201 \&.s element configure line1 -mapy y2
202 .CE
203 Axes can be configured in many ways too. For example, you change the
204 scale of the Y-axis from linear to log using the \fBaxis\fR operation.
205 .CS
206 # Y-axis is log scale.
207 \&.s axis configure y -logscale yes
208 .CE
209 Axis limits are reset by simply specifying new axis
210 limits using the \fB\-min\fR and \fB\-max\fR configuration options.
211 .CS
212 \&.s axis configure x -min 1.0 -max 1.5
213 \&.s axis configure y -min 12.0 -max 55.15
214 .CE
215 By default, the limits of the axis are determined from data values.
216 To reset back to the default limits, set the \fB\-min\fR and
217 \fB\-max\fR options to the empty value.
218 .CS
219 # Reset the axes to autoscale again.
220 \&.s axis configure x -min {} -max {}
221 \&.s axis configure y -min {} -max {}
222 .CE
223 It's common with strip charts to automatically maintain a view of
224 the most recent time points. You can do this my setting the
225 \fB\-autorange\fR option.
226 .CS
227 \&.s axis configure x -autorange 20.0
228 .CE
229 If the time points are added in X-coordinates 1.0 unit, only the last
230 twenty time points will be displayed. As more data
231 is added, the view will march along.
232 .PP
233 Sometimes the rate of data is so high that changing the axis limits
234 with each additional time point is prohibitive. You can use the
235 \fB\-shiftby\fR option to define an increment to shift the view
236 when needed.
237 .CS
238 \&.s axis configure x -shiftby 15.0
239 .CE
240 When the view is shifted, it will allow a range of 15
241 new time points to be added until the axis limits are recomputed.
242 .PP
243 By default, the legend is displayed in the right margin. You can
244 change this or any other legend configuration options using the
245 \fBlegend\fR component.
246 .CS
247 # Configure the legend font, color, and relief
248 \&.s legend configure -position left -relief raised \\
249 -font fixed -fg blue
250 .CE
251 To prevent the legend from being displayed, turn on the \fB\-hide\fR
252 option.
253 .CS
254 # Don't display the legend.
255 \&.s legend configure -hide yes\fR
256 .CE
257 The \fBstripchart\fR widget has simple drawing procedures called markers.
258 They can be used to highlight or annotate data in the strip chart. The types
259 of markers available are bitmaps, images, polygons, lines, or windows.
260 Markers can be used, for example, to mark or brush points. Here
261 is a text marker which labels the data first point. Markers
262 are created using the \fBmarker\fR operation.
263 .CS
264 # Create a label for the first data point of "line1".
265 \&.s marker create text \-name first_marker \-coords { 0.2 26.18 } \\
266 \-text "start" \-anchor se \-xoffset -10 \-yoffset -10
267 .CE
268 This creates a text marker named \fBfirst_marker\fR. It will display
269 the text "start" near the coordinates of the first data point. The
270 \fB\-anchor\fR, \fB\-xoffset\fR, and \fB\-yoffset\fR options are used
271 to display the marker above and to the left of the data point, so that
272 the actual data point isn't covered by the marker. By default,
273 markers are drawn last, on top of data. You can change this with the
274 \fB\-under\fR option.
275 .CS
276 # Draw the label before elements are drawn.
277 \&.s marker configure first_marker -under yes
278 .CE
279 You can add cross hairs or grid lines using the \fBcrosshairs\fR and
280 \fBgrid\fR operations.
281 .CS
282 # Display both cross hairs and grid lines.
283 \&.s crosshairs configure \-hide no \-color red
284 \&.s grid configure \-hide no \-dashes { 2 2 }
285 .CE
286 Finally, to get hardcopy of the strip chart, use the \fBpostscript\fR
287 operation.
288 .CS
289 # Print the strip chart into file "file.ps"
290 \&.s postscript output file.ps \-maxpect yes \-decorations no
291 .CE
292 This generates a file \fBfile.ps\fR containing the encapsulated
293 PostScript of the strip chart. The option \fB\-maxpect\fR says to scale the
294 plot to the size of the page. Turning off the \fB\-decorations\fR
295 option indicates that no borders or color backgrounds should be
296 displayed (i.e. the background of the margins, legend, and plotting
297 area will be white).
298 .SH "STRIPCHART OPERATIONS"
299 .TP
300 \fIpathName \fBaxis \fIoperation\fR ?\fIarg\fR?...
301 See the
302 .SB "AXIS COMPONENTS"
303 section.
304 .TP
305 \fIpathName \fBbar \fIelemName \fR?\fIoption value\fR?...
306 Creates a new barchart element \fIelemName\fR. It's an
307 error if an element \fIelemName\fR already exists.
308 See the manual for \fBbarchart\fR for details about
309 what \fIoption\fR and \fIvalue\fR pairs are valid.
310 .TP
311 \fIpathName \fBcget\fR \fIoption\fR
312 Returns the current value of the stripchart configuration option given by
313 \fIoption\fR. \fIOption\fR may be any option described
314 below for the \fBconfigure\fR operation.
315 .TP
316 \fIpathName \fBconfigure \fR?\fIoption value\fR?...
317 Queries or modifies the configuration options of the strip chart. If
318 \fIoption\fR isn't specified, a list describing all of the current
319 options for \fIpathName\fR is returned. If \fIoption\fR is specified,
320 but not \fIvalue\fR, then a list describing \fIoption\fR is returned.
321 If one or more \fIoption\fR and \fIvalue\fR pairs are specified, then
322 for each pair, the stripchart option \fIoption\fR is set to \fIvalue\fR.
323 The following options are valid for the stripchart.
324 .RS
325 .TP
326 \fB\-background \fIcolor\fR
327 Sets the background color. This includes the margins and
328 legend, but not the plotting area.
329 .TP
330 \fB\-borderwidth \fIpixels\fR
331 Sets the width of the 3\-D border around the outside edge of the widget. The
332 \fB\-relief\fR option determines if the border is to be drawn. The
333 default is \fB2\fR.
334 .TP
335 \fB\-bottommargin \fIpixels\fR
336 Specifies the size of the margin below the X\-coordinate axis. If
337 \fIpixels\fR is \fB0\fR, the size of the margin is selected automatically.
338 The default is \fB0\fR.
339 .TP
340 \fB\-bufferelements \fIboolean\fR
341 Indicates whether to draw elements into a pixmap before displaying
342 them on the screen. The advantage of buffering elements is when markers
343 are used heavily. Markers can be moved and redrawn without requiring
344 every element to be redrawn again. The disadvantage is that it takes
345 slightly longer to draw the graph. If \fIboolean\fR is true, data elements are
346 drawn to an internal pixmap. The option should be turned off if the plot
347 is updated frequently. See the
348 .SB "SPEED TIPS"
349 section.
350 The default is \fB1\fR.
351 .TP
352 \fB\-buffergraph \fIboolean\fR
353 Indicates whether to draw the graph into a pixmap first.
354 If \fIboolean\fR is true, the entire graph is drawn into a pixmap and then
355 copied onto the screen. This reduces flashing. If false, the graph is
356 drawn directly into the window. Especially under Windows, turning off the
357 option can be helpful when the stripchart is updated frequently. Turning
358 off this option also turns \fB\-bufferelements\fR off. See the
359 .SB "SPEED TIPS"
360 section.
361 The default is \fB1\fR.
362 .TP
363 \fB\-cursor \fIcursor\fR
364 Specifies the widget's cursor. The default
365 cursor is \fBcrosshair\fR.
366 .TP
367 \fB\-font \fIfontName\fR
368 Specifies the title font. The default is
369 \fB*-Helvetica-Bold-R-Normal-*-18-180-*\fR.
370 .TP
371 \fB\-halo \fIpixels\fR
372 Specifies a maximum distance to consider when searching for the
373 closest data point (see the element's \fBclosest\fR operation below).
374 Data points further than \fIpixels\fR away are ignored. The default is
375 \fB0.5i\fR.
376 .TP
377 \fB\-height \fIpixels\fR
378 Specifies the requested height of widget. The default is
379 \fB4i\fR.
380 .TP
381 \fB\-invertxy \fIboolean\fR
382 Indicates whether the placement X\-axis and Y\-axis should be inverted. If
383 \fIboolean\fR is true, the X and Y axes are swapped. The default is
384 \fB0\fR.
385 .TP
386 \fB\-justify \fIjustify\fR
387 Specifies how the title should be justified. This matters only when
388 the title contains more than one line of text. \fIJustify\fR must be
389 \fBleft\fR, \fBright\fR, or \fBcenter\fR. The default is
390 \fBcenter\fR.
391 .TP
392 \fB\-leftmargin \fIpixels\fR
393 Sets the size of the margin from the left edge of the window to
394 the Y\-coordinate axis. If \fIpixels\fR is \fB0\fR, the size is
395 calculated automatically. The default is \fB0\fR.
396 .TP
397 \fB\-plotbackground \fIcolor\fR
398 Specifies the background color of the plotting area. The default is
399 \fBwhite\fR.
400 .TP
401 \fB\-plotborderwidth \fIpixels\fR
402 Sets the width of the 3-D border around the plotting area. The
403 \fB\-plotrelief\fR option determines if a border is drawn. The
404 default is \fB2\fR.
405 .TP
406 \fB\-plotpadx \fIpad\fR
407 Sets the amount of padding to be added to the left and right sides of
408 the plotting area. \fIPad\fR can be a list of one or two screen
409 distances. If \fIpad\fR has two elements, the left side of the
410 plotting area entry is padded by the first distance and the right side
411 by the second. If \fIpad\fR is just one distance, both the left and
412 right sides are padded evenly. The default is \fB8\fR.
413 .TP
414 \fB\-plotpady \fIpad\fR
415 Sets the amount of padding to be added to the top and bottom of the
416 plotting area. \fIPad\fR can be a list of one or two screen
417 distances. If \fIpad\fR has two elements, the top of the plotting
418 area is padded by the first distance and the bottom by the second. If
419 \fIpad\fR is just one distance, both the top and bottom are padded
420 evenly. The default is \fB8\fR.
421 .TP
422 \fB\-plotrelief \fIrelief\fR
423 Specifies the 3-D effect for the plotting area. \fIRelief\fR
424 indicates how the interior of the plotting area should appear relative
425 to rest of the strip chart; for example, \fBraised\fR means the plot should
426 appear to protrude from the strip chart, relative to the surface of the
427 strip chart. The default is \fBsunken\fR.
428 .TP
429 \fB\-relief \fIrelief\fR
430 Specifies the 3-D effect for the widget. \fIRelief\fR
431 indicates how the strip chart should appear relative to widget it is packed
432 into; for example, \fBraised\fR means the strip chart should
433 appear to protrude. The default is \fBflat\fR.
434 .TP
435 \fB\-rightmargin \fIpixels\fR
436 Sets the size of margin from the plotting area to the right edge of
437 the window. By default, the legend is displayed in this margin. If
438 \fIpixels\fR is than 1, the margin size is selected automatically.
439 .TP
440 \fB\-takefocus\fR \fIfocus\fR
441 Provides information used when moving the focus from window to window
442 via keyboard traversal (e.g., Tab and Shift-Tab). If \fIfocus\fR is
443 \fB0\fR, this means that this window should be skipped entirely during
444 keyboard traversal. \fB1\fR means that the this window should always
445 receive the input focus. An empty value means that the traversal
446 scripts make the decision whether to focus on the window.
447 The default is \fB""\fR.
448 .TP
449 \fB\-tile \fIimage\fR
450 Specifies a tiled background. If \fIimage\fR isn't
451 \fB""\fR, the background is tiled using \fIimage\fR.
452 Otherwise, the normal background color is drawn (see the
453 \fB\-background\fR option). \fIImage\fR must be an image created
454 using the Tk \fBimage\fR command. The default is \fB""\fR.
455 .TP
456 \fB\-title \fItext\fR
457 Sets the title to \fItext\fR. If \fItext\fR is \fB""\fR,
458 no title will be displayed.
459 .TP
460 \fB\-topmargin \fIpixels\fR
461 Specifies the size of the margin above the x2 axis. If \fIpixels\fR
462 is \fB0\fR, the margin size is calculated automatically.
463 .TP
464 \fB\-width \fIpixels\fR
465 Specifies the requested width of the widget. The default is
466 \fB5i\fR.
467 .RE
468 .TP
469 \fIpathName \fBcrosshairs \fIoperation \fR?\fIarg\fR?
470 See the
471 .SB "CROSSHAIRS COMPONENT"
472 section.
473 .TP
474 \fIpathName \fBelement \fIoperation \fR?\fIarg\fR?...
475 See the
476 .SB "ELEMENT COMPONENTS"
477 section.
478 .TP
479 \fIpathName \fBextents \fIitem\fR
480 Returns the size of a particular item in the strip chart. \fIItem\fR must
481 be either \fBleftmargin\fR, \fBrightmargin\fR, \fBtopmargin\fR,
482 \fBbottommargin\fR, \fBplotwidth\fR, or \fBplotheight\fR.
483 .TP
484 \fIpathName \fBgrid \fIoperation \fR?\fIarg\fR?...
485 See the
486 .SB "GRID COMPONENT"
487 section.
488 .TP
489 \fIpathName \fBinvtransform \fIwinX winY\fR
490 Performs an inverse coordinate transformation, mapping window
491 coordinates back to graph coordinates, using the standard X\-axis and Y\-axis.
492 Returns a list of containing the graph coordinates.
493 .TP
494 \fIpathName \fBlegend \fIoperation \fR?\fIarg\fR?...
495 See the
496 .SB "LEGEND COMPONENT"
497 section.
498 .TP
499 \fIpathName \fBline \fIelemName\fR ?\fIoption value\fR?...
500 The operation is the same as \fBelement\fR.
501 .TP
502 \fIpathName \fBmarker \fIoperation \fR?\fIarg\fR?...
503 See the
504 .SB "MARKER COMPONENTS"
505 section.
506 .TP
507 \fIpathName\fR \fBmetafile\fR ?\fIfileName\fR?
508 \fIThis operation is for Window platforms only\fR.
509 Creates a Windows enhanced metafile of the stripchart.
510 If present, \fIfileName\fR is the file name of the new metafile.
511 Otherwise, the metafile is automatically added to the clipboard.
512 .TP
513 \fIpathName \fBpostscript \fIoperation \fR?\fIarg\fR?...
514 See the
515 .SB "POSTSCRIPT COMPONENT"
516 section.
517 .TP
518 \fIpathName \fBsnap \fIphotoName\fR
519 Takes a snapshot of the strip chart and stores the contents in the photo
520 image \fIphotoName\fR. \fIPhotoName\fR is the name of a Tk photo
521 image that must already exist.
522 .TP
523 \fIpathName \fBtransform \fIx y\fR
524 Performs a coordinate transformation, mapping graph coordinates to
525 window coordinates, using the standard X\-axis and Y\-axis.
526 Returns a list containing the X\-Y screen coordinates.
527 .TP
528 \fIpathName \fBxaxis \fIoperation\fR ?\fIarg\fR?...
529 .TP
530 \fIpathName \fBx2axis \fIoperation\fR ?\fIarg\fR?...
531 .TP
532 \fIpathName \fByaxis \fIoperation\fR ?\fIarg\fR?...
533 .TP
534 \fIpathName \fBy2axis \fIoperation\fR ?\fIarg\fR?...
535 See the
536 .SB "AXIS COMPONENTS"
537 section.
538 .SH "STRIPCHART COMPONENTS"
539 A strip chart is composed of several components: coordinate axes, data
540 elements, legend, grid, cross hairs, postscript, and annotation
541 markers. Instead of one big set of configuration options and
542 operations, the strip chart is partitioned, where each component has its own
543 configuration options and operations that specifically control that
544 aspect or part of the strip chart.
545 .SS "AXIS COMPONENTS"
546 Four coordinate axes are automatically created: two X\-coordinate axes
547 (\fBx\fR and \fBx2\fR) and two Y\-coordinate axes (\fBy\fR, and
548 \fBy2\fR). By default, the axis \fBx\fR is located in the bottom
549 margin, \fBy\fR in the left margin, \fBx2\fR in the top margin, and
550 \fBy2\fR in the right margin.
551 .PP
552 An axis consists of the axis line, title, major and minor ticks, and
553 tick labels. Major ticks are drawn at uniform intervals along the
554 axis. Each tick is labeled with its coordinate value. Minor ticks
555 are drawn at uniform intervals within major ticks.
556 .PP
557 The range of the axis controls what region of data is plotted.
558 Data points outside the minimum and maximum limits of the axis are
559 not plotted. By default, the minimum and maximum limits are
560 determined from the data, but you can reset either limit.
561 .PP
562 You can create and use several axes. To create an axis, invoke
563 the axis component and its create operation.
564 .CS
565 # Create a new axis called "temperature"
566 \&.s axis create temperature
567 .CE
568 You map data elements to an axis using the element's \-mapy and \-mapx
569 configuration options. They specify the coordinate axes an element
570 is mapped onto.
571 .CS
572 # Now map the temperature data to this axis.
573 \&.s element create "temp" \-xdata $x \-ydata $tempData \\
574 \-mapy temperature
575 .CE
576 While you can have many axes, only four axes can be displayed
577 simultaneously. They are drawn in each of the margins surrounding the
578 plotting area. The axes x and y are drawn in the bottom and left
579 margins. The axes x2 and y2 are drawn in top and right margins.
580 Only x and y are shown by default. Note that the axes can have
581 different scales.
582 .PP
583 To display a different axis, you invoke one of the following
584 components: \fBxaxis\fR, \fByaxis\fR, \fBx2axis\fR, and \fBy2axis\fR.
585 The \fBuse\fR operation designates the axis to be drawn in the
586 corresponding margin: \fBxaxis\fR in the bottom, \fByaxis\fR in the left,
587 \fBx2axis\fR in the top, and \fBy2axis\fR in the right.
588 .CS
589 # Display the axis temperature in the left margin.
590 \&.s yaxis use temperature
591 .CE
592 .PP
593 You can configure axes in many ways. The axis scale can be linear or
594 logarithmic. The values along the axis can either monotonically
595 increase or decrease. If you need custom tick labels, you can specify
596 a Tcl procedure to format the label as you wish. You can
597 control how ticks are drawn, by changing the major tick interval
598 or the number of minor ticks. You can define non-uniform tick intervals,
599 such as for time-series plots.
600 .PP
601 .TP
602 \fIpathName \fBaxis \fBcget \fIaxisName \fIoption\fR
603 Returns the current value of the option given by \fIoption\fR for
604 \fIaxisName\fR. \fIOption\fR may be any option described below
605 for the axis \fBconfigure\fR operation.
606 .TP
607 \fIpathName \fBaxis \fBconfigure \fIaxisName \fR?\fIoption value\fR?...
608 Queries or modifies the configuration options of \fIaxisName\fR. If
609 \fIoption\fR isn't specified, a list describing all the current
610 options for \fIaxisName\fR is returned. If \fIoption\fR is specified, but
611 not \fIvalue\fR, then a list describing \fIoption\fR is
612 returned. If one or more \fIoption\fR and \fIvalue\fR pairs are
613 specified, then for each pair, the axis option \fIoption\fR is set to
614 \fIvalue\fR.
615 The following options are valid for axes.
616 .RS
617 .TP
618 \fB\-autorange \fIrange\fR
619 Sets the range of values for the axis to \fIrange\fR. The axis limits
620 are automatically reset to display the most recent data points in this range.
621 If \fIrange\fR is 0.0, the range is
622 determined from the limits of the data. If \fB\-min\fR or \fB-max\fR
623 are specified, they override this option. The default is \fB0.0\fR.
624 .TP
625 \fB\-color \fIcolor\fR
626 Sets the color of the axis and tick labels.
627 The default is \fBblack\fR.
628 .TP
629 \fB\-command \fIprefix\fR
630 Specifies a Tcl command to be invoked when formatting the axis tick
631 labels. \fIPrefix\fR is a string containing the name of a Tcl proc and
632 any extra arguments for the procedure. This command is invoked for each
633 major tick on the axis. Two additional arguments are passed to the
634 procedure: the pathname of the widget and the current the numeric
635 value of the tick. The procedure returns the formatted tick label. If
636 \fB""\fR is returned, no label will appear next to the tick. You can
637 get the standard tick labels again by setting \fIprefix\fR to
638 \fB""\fR. The default is \fB""\fR.
639 .sp 1
640 Please note that this procedure is invoked while the strip chart is redrawn.
641 You may query the configuration options. But do not reset them, because
642 this can have unexpected results.
643 .TP
644 \fB\-descending \fIboolean\fR
645 Indicates whether the values along the axis are monotonically increasing or
646 decreasing. If \fIboolean\fR is true, the axis values will be
647 decreasing. The default is \fB0\fR.
648 .TP
649 \fB\-hide \fIboolean\fR
650 Indicates whether the axis is displayed.
651 .TP
652 \fB\-justify \fIjustify\fR
653 Specifies how the axis title should be justified. This matters only
654 when the axis title contains more than one line of text. \fIJustify\fR
655 must be \fBleft\fR, \fBright\fR, or \fBcenter\fR. The default is
656 \fBcenter\fR.
657 .TP
658 \fB\-limits \fIformatStr\fR
659 Specifies a printf-like description to format the minimum and maximum
660 limits of the axis. The limits are displayed at the top/bottom or
661 left/right sides of the plotting area. \fIFormatStr\fR is a list of
662 one or two format descriptions. If one description is supplied, both
663 the minimum and maximum limits are formatted in the same way. If two,
664 the first designates the format for the minimum limit, the second for
665 the maximum. If \fB""\fR is given as either description, then
666 the that limit will not be displayed. The default is \fB""\fR.
667 .TP
668 \fB\-linewidth \fIpixels\fR
669 Sets the width of the axis and tick lines. The default is \fB1\fR
670 pixel.
671 .TP
672 \fB\-logscale \fIboolean\fR
673 Indicates whether the scale of the axis is logarithmic or linear. If
674 \fIboolean\fR is true, the axis is logarithmic. The default scale is
675 linear.
676 .TP
677 \fB\-loose \fIboolean\fR
678 Indicates whether the limits of the axis should fit the data points tightly,
679 at the outermost data points, or loosely, at the outer tick intervals.
680 This is relevant only when the axis limit is automatically calculated.
681 If \fIboolean\fR is true, the axis range is "loose".
682 The default is \fB0\fR.
683 .TP
684 \fB\-majorticks \fImajorList\fR
685 Specifies where to display major axis ticks. You can use this option
686 to display ticks at non-uniform intervals. \fIMajorList\fR is a list
687 of axis coordinates designating the location of major ticks. No
688 minor ticks are drawn. If \fImajorList\fR is \fB""\fR,
689 major ticks will be automatically computed. The default is \fB""\fR.
690 .TP
691 \fB\-max \fIvalue\fR
692 Sets the maximum limit of \fIaxisName\fR. Any data point greater
693 than \fIvalue\fR is not displayed. If \fIvalue\fR is \fB""\fR,
694 the maximum limit is calculated using the largest data value.
695 The default is \fB""\fR.
696 .TP
697 \fB\-min \fIvalue\fR
698 Sets the minimum limit of \fIaxisName\fR. Any data point less than
699 \fIvalue\fR is not displayed. If \fIvalue\fR is \fB""\fR,
700 the minimum limit is calculated using the smallest data value.
701 The default is \fB""\fR.
702 .TP
703 \fB\-minorticks \fIminorList\fR
704 Specifies where to display minor axis ticks. You can use this option
705 to display minor ticks at non-uniform intervals. \fIMinorList\fR is a
706 list of real values, ranging from 0.0 to 1.0, designating the placement of
707 a minor tick. No minor ticks are drawn if the \fB\-majortick\fR
708 option is also set. If \fIminorList\fR is \fB""\fR, minor ticks will
709 be automatically computed. The default is \fB""\fR.
710 .TP
711 \fB\-rotate \fItheta\fR
712 Specifies the how many degrees to rotate the axis tick labels.
713 \fITheta\fR is a real value representing the number of degrees
714 to rotate the tick labels. The default is \fB0.0\fR degrees.
715 .TP
716 \fB\-shiftby \fIvalue\fR
717 Specifies how much to automatically shift the range of the axis.
718 When the new data exceeds the current axis maximum, the maximum
719 is increased in increments of \fIvalue\fR. You can use this
720 option to prevent the axis limits from being recomputed
721 at each new time point. If \fIvalue\fR is 0.0, then no automatic
722 shifting is done. The default is \fB0.0\fR.
723 .TP
724 \fB\-showticks \fIboolean\fR
725 Indicates whether axis ticks should be drawn. If \fIboolean\fR is
726 true, ticks are drawn. If false, only the
727 axis line is drawn. The default is \fB1\fR.
728 .TP
729 \fB\-stepsize \fIvalue\fR
730 Specifies the interval between major axis ticks. If \fIvalue\fR isn't
731 a valid interval (must be less than the axis range),
732 the request is ignored and the step size is automatically calculated.
733 .TP
734 \fB\-subdivisions \fInumber\fR
735 Indicates how many minor axis ticks are
736 to be drawn. For example, if \fInumber\fR is two, only one minor
737 tick is drawn. If \fInumber\fR is one, no minor ticks are
738 displayed. The default is \fB2\fR.
739 .TP
740 \fB\-tickfont \fIfontName\fR
741 Specifies the font for axis tick labels. The default is
742 \fB*-Courier-Bold-R-Normal-*-100-*\fR.
743 .TP
744 \fB\-ticklength \fIpixels\fR
745 Sets the length of major and minor ticks (minor ticks are half the
746 length of major ticks). If \fIpixels\fR is less than zero, the axis
747 will be inverted with ticks drawn pointing towards the plot. The
748 default is \fB0.1i\fR.
749 .TP
750 \fB\-title \fItext\fR
751 Sets the title of the axis. If \fItext\fR is
752 \fB""\fR, no axis title will be displayed.
753 .TP
754 \fB\-titlecolor \fIcolor\fR
755 Sets the color of the axis title. The default is \fBblack\fR.
756 .TP
757 \fB\-titlefont \fIfontName\fR
758 Specifies the font for axis title. The default is
759 \fB*-Helvetica-Bold-R-Normal-*-14-140-*\fR.
760 .PP
761 Axis configuration options may be also be set by the \fBoption\fR
762 command. The resource class is \fBAxis\fR. The resource names
763 are the names of the axes (such as \fBx\fR or \fBx2\fR).
764 .CS
765 option add *Stripchart.Axis.Color blue
766 option add *Stripchart.x.LogScale true
767 option add *Stripchart.x2.LogScale false
768 .CE
769 .RE
770 .TP
771 \fIpathName \fBaxis \fBcreate \fIaxisName \fR?\fIoption value\fR?...
772 Creates a new axis by the name \fIaxisName\fR. No axis by the same
773 name can already exist. \fIOption\fR and \fIvalue\fR are described
774 in above in the axis \fBconfigure\fR operation.
775 .TP
776 \fIpathName \fBaxis \fBdelete \fR?\fIaxisName\fR?...
777 Deletes the named axes. An axis is not really
778 deleted until it is not longer in use, so it's safe to delete
779 axes mapped to elements.
780 .TP
781 \fIpathName \fBaxis invtransform \fIaxisName value\fR
782 Performs the inverse transformation, changing the screen coordinate
783 \fIvalue\fR to a graph coordinate, mapping the value mapped to
784 \fIaxisName\fR. Returns the graph coordinate.
785 .TP
786 \fIpathName \fBaxis limits \fIaxisName\fR
787 Returns a list of the minimum and maximum limits for \fIaxisName\fR. The order
788 of the list is \fBmin max\fR.
789 .TP
790 \fIpathName \fBaxis names \fR?\fIpattern\fR?...
791 Returns a list of axes matching zero or more patterns. If no
792 \fIpattern\fR argument is give, the names of all axes are returned.
793 .TP
794 \fIpathName \fBaxis transform \fIaxisName value\fR
795 Transforms the coordinate \fIvalue\fR to a screen coordinate by mapping
796 the it to \fIaxisName\fR. Returns the transformed screen coordinate.
797 .PP
798 Only four axes can be displayed simultaneously. By default, they are
799 \fBx\fR, \fBy\fR, \fBx2\fR, and \fBy2\fR. You can swap in a different
800 axis with \fBuse\fR operation of the special axis components:
801 \fBxaxis\fR, \fBx2axis\fR, \fByaxis\fR, and \fBy2axis\fR.
802 .CS
803 \&.g create axis temp
804 \&.g create axis time
805 \&...
806 \&.g xaxis use temp
807 \&.g yaxis use time
808 .CE
809 Only the axes specified for use are displayed on the screen.
810 .PP
811 The \fBxaxis\fR, \fBx2axis\fR, \fByaxis\fR, and \fBy2axis\fR
812 components operate on an axis location rather than a specific axis
813 like the more general \fBaxis\fR component does. The \fBxaxis\fR
814 component manages the X-axis located in the bottom margin (whatever
815 axis that happens to be). Likewise, \fByaxis\fR uses the Y-axis in
816 the left margin, \fBx2axis\fR the top X-axis, and \fBy2axis\fR the
817 right Y-axis.
818 .PP
819 They implicitly control the axis that is currently using to that
820 location. By default, \fBxaxis\fR uses the \fBx\fR axis, \fByaxis\fR
821 uses \fBy\fR, \fBx2axis\fR uses \fBx2\fR, and \fBy2axis\fR uses
822 \fBy2\fR. These components can be more convenient to use than always
823 determining what axes are current being displayed by the graph.
824 .PP
825 The following operations are available for axes. They mirror exactly
826 the operations of the \fBaxis\fR component. The \fIaxis\fR argument
827 must be \fBxaxis\fR, \fBx2axis\fR, \fByaxis\fR, or \fBy2axis\fR.
828 .TP
829 \fIpathName \fIaxis \fBcget \fIoption\fR
830 .TP
831 \fIpathName \fIaxis \fBconfigure \fR?\fIoption value\fR?...
832 .TP
833 \fIpathName \fIaxis\fB invtransform \fIvalue\fR
834 .TP
835 \fIpathName \fIaxis \fBlimits\fR
836 .TP
837 \fIpathName \fIaxis\fB transform \fIvalue\fR
838 .TP
839 \fIpathName \fIaxis\fB use \fR?\fIaxisName\fR?
840 Designates the axis \fIaxisName\fR is to be displayed at this
841 location. \fIAxisName\fR can not be already in use at another location.
842 This command returns the name of the axis currently using this location.
843 .SS "CROSSHAIRS COMPONENT"
844 Cross hairs consist of two intersecting lines (one vertical and one horizontal)
845 drawn completely across the plotting area. They are used to position
846 the mouse in relation to the coordinate axes. Cross hairs differ from line
847 markers in that they are implemented using XOR drawing primitives.
848 This means that they can be quickly drawn and erased without redrawing
849 the entire strip chart.
850 .PP
851 The following operations are available for cross hairs:
852 .TP
853 \fIpathName \fBcrosshairs cget \fIoption\fR
854 Returns the current value of the cross hairs configuration option
855 given by \fIoption\fR. \fIOption\fR may be any option
856 described below for the cross hairs \fBconfigure\fR operation.
857 .TP
858 \fIpathName \fBcrosshairs configure \fR?\fIoption value\fR?...
859 Queries or modifies the configuration options of the cross hairs. If
860 \fIoption\fR isn't specified, a list describing all the current
861 options for the cross hairs is returned. If \fIoption\fR is specified,
862 but not \fIvalue\fR, then a list describing \fIoption\fR is returned.
863 If one or more \fIoption\fR and \fIvalue\fR pairs are specified, then
864 for each pair, the cross hairs option \fIoption\fR is set to
865 \fIvalue\fR.
866 The following options are available for cross hairs.
867 .RS
868 .TP
869 \fB\-color \fIcolor\fR
870 Sets the color of the cross hairs. The default is \fBblack\fR.
871 .TP
872 \fB\-dashes \fIdashList\fR
873 Sets the dash style of the cross hairs. \fIDashList\fR is a list of up
874 to 11 numbers that alternately represent the lengths of the dashes
875 and gaps on the cross hair lines. Each number must be between 1 and
876 255. If \fIdashList\fR is \fB""\fR, the cross hairs will be solid
877 lines.
878 .TP
879 \fB\-hide \fIboolean\fR
880 Indicates whether cross hairs are drawn. If \fIboolean\fR is true,
881 cross hairs are not drawn. The default is \fByes\fR.
882 .TP
883 \fB\-linewidth \fIpixels\fR
884 Set the width of the cross hair lines. The default is \fB1\fR.
885 .TP
886 \fB\-position \fIpos\fR
887 Specifies the screen position where the cross hairs intersect.
888 \fIPos\fR must be in the form "\fI@x,y\fR", where \fIx\fR and \fIy\fR
889 are the window coordinates of the intersection.
890 .PP
891 Cross hairs configuration options may be also be set by the
892 \fBoption\fR command. The resource name and class are
893 \fBcrosshairs\fR and \fBCrosshairs\fR respectively.
894 .CS
895 option add *Stripchart.Crosshairs.LineWidth 2
896 option add *Stripchart.Crosshairs.Color red
897 .CE
898 .RE
899 .TP
900 \fIpathName \fBcrosshairs off\fR
901 Turns of the cross hairs.
902 .TP
903 \fIpathName \fBcrosshairs on\fR
904 Turns on the display of the cross hairs.
905 .TP
906 \fIpathName \fBcrosshairs toggle\fR
907 Toggles the current state of the cross hairs, alternately mapping and
908 unmapping the cross hairs.
909 .SS "ELEMENT COMPONENTS"
910 A data element represents a set of data. It contains x and y vectors
911 containing the coordinates of the data points. Elements can be
912 displayed with a symbol at each data point and lines connecting the
913 points. Elements also control the appearance of the data, such as the
914 symbol type, line width, color etc.
915 .PP
916 When new data elements are created, they are automatically added to a
917 list of displayed elements. The display list controls what elements
918 are drawn and in what order.
919 .PP
920 The following operations are available for elements.
921 .TP
922 \fIpathName \fBelement activate \fIelemName \fR?\fIindex\fR?...
923 Specifies the data points of element \fIelemName\fR to be drawn
924 using active foreground and background colors. \fIElemName\fR is the
925 name of the element and \fIindex\fR is a number representing the index
926 of the data point. If no indices are present then all data points
927 become active.
928 .TP
929 \fIpathName \fBelement cget \fIelemName \fIoption\fR
930 Returns the current value of the element configuration option given by
931 \fIoption\fR. \fIOption\fR may be any option described below
932 for the element \fBconfigure\fR operation.
933 .TP
934 \fIpathName \fBelement closest \fIx y\fR \fIvarName\fR ?\fIoption value\fR?... ?\fIelemName\fR?...
935 Finds the data point closest to the window coordinates \fIx\fR and
936 \fIy\fR in the element \fIelemName\fR. \fIElemName\fR is the name of
937 an element, that must not be hidden. If no elements are specified,
938 then all visible elements are searched. It returns via the array
939 variable \fIvarName\fR the name of the closest element, the index of
940 its closest point, and the graph coordinates of the point. Returns
941 \fB0\fR, if no data point within the threshold distance can be found,
942 otherwise \fB1\fR is returned. The following
943 \fIoption\fR\-\fIvalue\fR pairs are available.
944 .RS
945 .TP
946 \fB\-halo \fIpixels\fR
947 Specifies a threshold distance where selected data points are ignored.
948 \fIPixels\fR is a valid screen distance, such as \fB2\fR or \fB1.2i\fR.
949 If this option isn't specified, then it defaults to the value of the
950 stripchart's \fB\-halo\fR option.
951 .TP
952 \fB\-interpolate \fIboolean\fR
953 Indicates that both the data points and interpolated points along
954 the line segment formed should be considered. If \fIboolean\fR
955 is true, the closest line segment will be selected instead of the
956 closest point. If this option isn't specified, \fIboolean\fR defaults
957 to \fB0\fR.
958 .RE
959 .TP
960 \fIpathName \fBelement configure \fIelemName \fR?\fIoption value\fR?...
961 Queries or modifies the configuration options for elements. If
962 \fIoption\fR isn't specified, a list describing all the current
963 options for \fIelemName\fR is returned. If \fIoption\fR is specified,
964 but not \fIvalue\fR, then a list describing the option \fIoption\fR is
965 returned. If one or more \fIoption\fR and \fIvalue\fR pairs are
966 specified, then for each pair, the element option \fIoption\fR is set
967 to \fIvalue\fR. The following options are valid for elements.
968 .RS
969 .TP
970 \fB\-activepen \fIpenName\fR
971 Specifies pen to use to draw active element. If \fIpenName\fR is
972 \fB""\fR, no active elements will be drawn. The default is
973 \fBactiveLine\fR.
974 .TP
975 \fB\-color \fIcolor\fR
976 Sets the color of the traces connecting the data points.
977 .TP
978 \fB\-dashes \fIdashList\fR
979 Sets the dash style of element line. \fIDashList\fR is a list of up to
980 11 numbers that alternately represent the lengths of the dashes and
981 gaps on the element line. Each number must be between 1 and 255. If
982 \fIdashList\fR is \fB""\fR, the lines will be solid.
983 .TP
984 \fB\-data \fIcoordList\fR
985 Specifies the X\-Y coordinates of the data. \fICoordList\fR is a
986 list of numeric expressions representing the X\-Y coordinate pairs
987 of each data point.
988 .TP
989 \fB\-fill \fIcolor\fR
990 Sets the interior color of symbols. If \fIcolor\fR is \fB""\fR, then
991 the interior of the symbol is transparent. If \fIcolor\fR is
992 \fBdefcolor\fR, then the color will be the same as the \fB\-color\fR
993 option. The default is \fBdefcolor\fR.
994 .TP
995 \fB\-hide \fIboolean\fR
996 Indicates whether the element is displayed. The default is \fBno\fR.
997 .TP
998 \fB\-label \fItext\fR
999 Sets the element's label in the legend. If \fItext\fR
1000 is \fB""\fR, the element will have no entry in the legend.
1001 The default label is the element's name.
1002 .TP
1003 \fB\-linewidth \fIpixels\fR
1004 Sets the width of the connecting lines between data points. If
1005 \fIpixels\fR is \fB0\fR, no connecting lines will be drawn between
1006 symbols. The default is \fB0\fR.
1007 .TP
1008 \fB\-mapx \fIxAxis\fR
1009 Selects the X\-axis to map the element's X\-coordinates onto.
1010 \fIXAxis\fR must be the name of an axis. The default is \fBx\fR.
1011 .TP
1012 \fB\-mapy \fIyAxis\fR
1013 Selects the Y\-axis to map the element's Y\-coordinates onto.
1014 \fIYAxis\fR must be the name of an axis. The default is \fBy\fR.
1015 .TP
1016 \fB\-offdash \fIcolor\fR
1017 Sets the color of the stripes when traces are dashed (see the
1018 \fB\-dashes\fR option). If \fIcolor\fR is \fB""\fR, then the "off"
1019 pixels will represent gaps instead of stripes. If \fIcolor\fR is
1020 \fBdefcolor\fR, then the color will be the same as the \fB\-color\fR
1021 option. The default is \fBdefcolor\fR.
1022 .TP
1023 \fB\-outline \fIcolor\fR
1024 Sets the color or the outline around each symbol. If \fIcolor\fR is
1025 \fB""\fR, then no outline is drawn. If \fIcolor\fR is \fBdefcolor\fR,
1026 then the color will be the same as the \fB\-color\fR option. The
1027 default is \fBdefcolor\fR.
1028 .TP
1029 \fB\-outlinewidth \fIpixels\fR
1030 Sets the width of the outline bordering each symbol. If \fIpixels\fR
1031 is \fB0\fR, no outline will be drawn. The default is \fB1\fR.
1032 .TP
1033 \fB\-pixels \fIpixels\fR
1034 Sets the size of symbols. If \fIpixels\fR is \fB0\fR, no symbols will
1035 be drawn. The default is \fB0.125i\fR.
1036 .TP
1037 \fB\-scalesymbols \fIboolean\fR
1038 If \fIboolean\fR is true, the size of the symbols
1039 drawn for \fIelemName\fR will change with scale of the X\-axis and Y\-axis.
1040 At the time this option is set, the current ranges of the axes are
1041 saved as the normalized scales (i.e scale factor is 1.0) and the
1042 element is drawn at its designated size (see the \fB\-pixels\fR
1043 option). As the scale of the axes change, the symbol will be scaled
1044 according to the smaller of the X\-axis and Y\-axis scales. If \fIboolean\fR
1045 is false, the element's symbols are drawn at the designated size,
1046 regardless of axis scales. The default is \fB0\fR.
1047 .TP
1048 \fB\-smooth \fIsmooth\fR
1049 Specifies how connecting line segments are drawn between data points.
1050 \fISmooth\fR can be either \fBlinear\fR, \fBstep\fR, \fBnatural\fR, or
1051 \fBquadratic\fR. If \fIsmooth\fR is \fBlinear\fR, a single line
1052 segment is drawn, connecting both data points. When \fIsmooth\fR is
1053 \fBstep\fR, two line segments are drawn. The first is a horizontal
1054 line segment which steps the next x-coordinate. The second is a
1055 vertical line, moving to the next y-coordinate. Both \fInatural\fR and
1056 \fIquadratic\fR generate multiple segments between data points. If
1057 \fInatural\fR, the segments are generated using a cubic spline. If
1058 \fIquadratic\fR, a quadratic spline is used. The default is
1059 \fIlinear\fR.
1060 .TP
1061 \fB\-styles \fIstyleList\fR
1062 Specifies what pen to use based upon the range of weights given.
1063 \fIStyleList\fR is a list of style specifications. Each style
1064 specification, in turn, is a list consisting of a pen name, and
1065 optionally a minimum and maximum range. Data points whose weight (see
1066 the \fB\-weight\fR option) falls in this range, are drawn with this
1067 pen. If no range is specified it defaults to the number of the pen in
1068 the list.
1069 .TP
1070 \fB\-symbol \fIsymbol\fR
1071 Specifies the symbol for data points. \fISymbol\fR can be either
1072 \fBsquare\fR, \fBcircle\fR, \fBdiamond\fR, \fBplus\fR, \fBcross\fR,
1073 \fBsplus\fR, \fBscross\fR, \fBtriangle\fR, \fB""\fR (where no symbol
1074 is drawn), or a bitmap. Bitmaps are specified as "\fIsource\fR
1075 ?\fImask\fR?", where \fIsource\fR is the name of the bitmap, and
1076 \fImask\fR is the bitmap's optional mask. The default is
1077 \fBcircle\fR.
1078 .TP
1079 \fB\-weights \fIwVec\fR
1080 Specifies the weights of the individual data points. This, in
1081 conjunction with the list pen styles (see the \fB\-styles\fR option)
1082 controls how data points are drawn. \fIWVec\fR is the name of a BLT
1083 vector or a list of numeric expressions representing the weights for
1084 each data point.
1085 .TP
1086 \fB\-xdata \fIxVec\fR
1087 Specifies the x-coordinates of the data. \fIXVec\fR is the name of
1088 a BLT vector or a list of numeric expressions.
1089 .TP
1090 \fB\-ydata \fIyVec\fR
1091 Specifies the y-coordinates of the data. \fIYVec\fR is the name of
1092 a BLT vector or a list of numeric expressions.
1093 .PP
1094 Element configuration options may also be set by the \fBoption\fR
1095 command. The resource class is \fBElement\fR. The resource name is
1096 the name of the element.
1097 .CS
1098 option add *Stripchart.Element.symbol line
1099 option add *Stripchart.e1.symbol line
1100 .CE
1101 .RE
1102 .TP
1103 \fIpathName \fBelement create \fIelemName\fR ?\fIoption value\fR?...
1104 Creates a new element \fIelemName\fR. It's an error is
1105 an element \fIelemName\fR already exists. If
1106 additional arguments are present, they specify options valid for
1107 element \fBconfigure\fR operation.
1108 .TP
1109 \fIpathName \fBelement deactivate \fIelemName\fR ?\fIelemName\fR?...
1110 Deactivates all the elements matching \fIpattern\fR.
1111 Elements whose names match any of the patterns given are redrawn using
1112 their normal colors.
1113 .TP
1114 \fIpathName \fBelement delete\fR ?\fIelemName\fR?...
1115 Deletes all the named elements. The graph is automatically redrawn.
1116 .TP
1117 \fIpathName \fBelement exists \fIelemName\fR
1118 Returns \fB1\fR if an element \fIelemName\fR currently exists and \fB0\fR otherwise.
1119 .TP
1120 \fIpathName \fBelement names \fR?\fIpattern\fR?...
1121 Returns the elements matching one or more pattern. If no
1122 \fIpattern\fR is given, the names of all elements is returned.
1123 .TP
1124 \fIpathName \fBelement show\fR ?\fInameList\fR?
1125 Queries or modifies the element display list. The element display
1126 list designates the elements drawn and in what
1127 order. \fINameList\fR is a list of elements to be displayed in the
1128 order they are named. If there is no \fInameList\fR argument,
1129 the current display list is returned.
1130 .TP
1131 \fIpathName \fBelement type\fR \fIelemName\fR
1132 Returns the type of \fIelemName\fR.
1133 If the element is a bar element, the commands returns the string
1134 \fB"bar"\fR, otherwise it returns \fB"line"\fR.
1135 .CE
1136 .SS "GRID COMPONENT"
1137 Grid lines extend from the major and minor ticks of each axis
1138 horizontally or vertically across the plotting area. The following
1139 operations are available for grid lines.
1140 .TP
1141 \fIpathName \fBgrid cget \fIoption\fR
1142 Returns the current value of the grid line configuration option given by
1143 \fIoption\fR. \fIOption\fR may be any option described below
1144 for the grid \fBconfigure\fR operation.
1145 .TP
1146 \fIpathName \fBgrid configure\fR ?\fIoption value\fR?...
1147 Queries or modifies the configuration options for grid lines. If
1148 \fIoption\fR isn't specified, a list describing all the current
1149 grid options for \fIpathName\fR is returned. If \fIoption\fR is specified,
1150 but not \fIvalue\fR, then a list describing \fIoption\fR is
1151 returned. If one or more \fIoption\fR and \fIvalue\fR pairs are
1152 specified, then for each pair, the grid line option \fIoption\fR is set to
1153 \fIvalue\fR. The following options are valid for grid lines.
1154 .RS
1155 .TP
1156 \fB\-color \fIcolor\fR
1157 Sets the color of the grid lines. The default is \fBblack\fR.
1158 .TP
1159 \fB\-dashes \fIdashList\fR
1160 Sets the dash style of the grid lines. \fIDashList\fR is a list of up
1161 to 11 numbers that alternately represent the lengths of the dashes
1162 and gaps on the grid lines. Each number must be between 1 and 255.
1163 If \fIdashList\fR is \fB""\fR, the grid will be solid lines.
1164 .TP
1165 \fB\-hide \fIboolean\fR
1166 Indicates whether the grid should be drawn. If \fIboolean\fR
1167 is true, grid lines are not shown. The default is \fByes\fR.
1168 .TP
1169 \fB\-linewidth \fIpixels\fR
1170 Sets the width of grid lines. The default width is \fB1\fR.
1171 .TP
1172 \fB\-mapx \fIxAxis\fR
1173 Specifies the X\-axis to display grid lines. \fIXAxis\fR
1174 must be the name of an axis. The default is \fBx\fR.
1175 .TP
1176 \fB\-mapy \fIyAxis\fR
1177 Specifies the Y\-axis to display grid lines. \fIYAxis\fR
1178 must be the name of an axis. The default is \fBy\fR.
1179 .TP
1180 \fB\-minor \fIboolean\fR
1181 Indicates whether the grid lines should be drawn for minor ticks.
1182 If \fIboolean\fR is true, the lines will appear at
1183 minor tick intervals. The default is \fB1\fR.
1184 .PP
1185 Grid configuration options may also be set by the
1186 \fBoption\fR command. The resource name and class are \fBgrid\fR and
1187 \fBGrid\fR respectively.
1188 .CS
1189 option add *Stripchart.grid.LineWidth 2
1190 option add *Stripchart.Grid.Color black
1191 .CE
1192 .RE
1193 .TP
1194 \fIpathName \fBgrid off\fR
1195 Turns off the display the grid lines.
1196 .TP
1197 \fIpathName \fBgrid on\fR
1198 Turns on the display the grid lines.
1199 .TP
1200 \fIpathName \fBgrid toggle\fR
1201 Toggles the display of the grid.
1202 .SS "LEGEND COMPONENT"
1203 The legend displays a list of the data elements. Each entry consists
1204 of the element's symbol and label. The legend can appear in any
1205 margin (the default location is in the right margin). It
1206 can also be positioned anywhere within the plotting area.
1207 .PP
1208 The following operations are valid for the legend.
1209 .TP
1210 \fIpathName \fBlegend activate \fIpattern\fR...
1211 Selects legend entries to be drawn using the active legend colors and relief.
1212 All entries whose element names match \fIpattern\fR are selected. To
1213 be selected, the element name must match only one \fIpattern\fR.
1214 .TP
1215 \fIpathName \fBlegend cget \fIoption\fR
1216 Returns the current value of a legend configuration option.
1217 \fIOption\fR may be any option described below in the
1218 legend \fBconfigure\fR operation.
1219 .TP
1220 \fIpathName \fBlegend configure \fR?\fIoption value\fR?...
1221 Queries or modifies the configuration options for the legend. If
1222 \fIoption\fR isn't specified, a list describing the current
1223 legend options for \fIpathName\fR is returned. If \fIoption\fR is
1224 specified, but not \fIvalue\fR, then a list describing \fIoption\fR is
1225 returned. If one or more \fIoption\fR and \fIvalue\fR pairs are
1226 specified, then for each pair, the legend option \fIoption\fR is set
1227 to \fIvalue\fR. The following options are valid for the legend.
1228 .RS
1229 .TP
1230 \fB\-activebackground \fIcolor\fR
1231 Sets the background color for active legend entries. All legend
1232 entries marked active (see the legend \fBactivate\fR operation) are
1233 drawn using this background color.
1234 .TP
1235 \fB\-activeborderwidth \fIpixels\fR
1236 Sets the width of the 3-D border around the outside edge of the active legend
1237 entries. The default is \fB2\fR.
1238 .TP
1239 \fB\-activeforeground \fIcolor\fR
1240 Sets the foreground color for active legend entries. All legend
1241 entries marked as active (see the legend \fBactivate\fR operation) are
1242 drawn using this foreground color.
1243 .TP
1244 \fB\-activerelief \fIrelief\fR
1245 Specifies the 3-D effect desired for active legend entries.
1246 \fIRelief\fR denotes how the interior of the entry should appear
1247 relative to the legend; for example, \fBraised\fR means the entry
1248 should appear to protrude from the legend, relative to the surface of
1249 the legend. The default is \fBflat\fR.
1250 .TP
1251 \fB\-anchor \fIanchor\fR
1252 Tells how to position the legend relative to the positioning point for
1253 the legend. This is dependent on the value of the \fB\-position\fR
1254 option. The default is \fBcenter\fR.
1255 .RS
1256 .TP 1.25i
1257 \fBleft\fR or \fBright\fR
1258 The anchor describes how to position the legend vertically.
1259 .TP
1260 \fBtop\fR or \fBbottom\fR
1261 The anchor describes how to position the legend horizontally.
1262 .TP
1263 \fB@x,y\fR
1264 The anchor specifies how to position the legend relative to the
1265 positioning point. For example, if \fIanchor\fR is \fBcenter\fR then
1266 the legend is centered on the point; if \fIanchor\fR is \fBn\fR then
1267 the legend will be drawn such that the top center point of the
1268 rectangular region occupied by the legend will be at the positioning
1269 point.
1270 .TP
1271 \fBplotarea\fR
1272 The anchor specifies how to position the legend relative to the
1273 plotting area. For example, if \fIanchor\fR is \fBcenter\fR then the
1274 legend is centered in the plotting area; if \fIanchor\fR is \fBne\fR
1275 then the legend will be drawn such that occupies the upper right
1276 corner of the plotting area.
1277 .RE
1278 .TP
1279 \fB\-background \fIcolor\fR
1280 Sets the background color of the legend. If \fIcolor\fR is \fB""\fR,
1281 the legend background with be transparent.
1282 .TP
1283 \fB\-borderwidth \fIpixels\fR
1284 Sets the width of the 3-D border around the outside edge of the legend (if
1285 such border is being drawn; the \fBrelief\fR option determines this).
1286 The default is \fB2\fR pixels.
1287 .TP
1288 \fB\-font \fIfontName\fR
1289 \fIFontName\fR specifies a font to use when drawing the labels of each
1290 element into the legend. The default is
1291 \fB*-Helvetica-Bold-R-Normal-*-12-120-*\fR.
1292 .TP
1293 \fB\-foreground \fIcolor\fR
1294 Sets the foreground color of the text drawn for the element's label.
1295 The default is \fBblack\fR.
1296 .TP
1297 \fB\-hide \fIboolean\fR
1298 Indicates whether the legend should be displayed. If \fIboolean\fR is
1299 true, the legend will not be draw. The default is \fBno\fR.
1300 .TP
1301 \fB\-ipadx \fIpad\fR
1302 Sets the amount of internal padding to be added to the width of each
1303 legend entry. \fIPad\fR can be a list of one or two screen distances. If
1304 \fIpad\fR has two elements, the left side of the legend entry is
1305 padded by the first distance and the right side by the second. If
1306 \fIpad\fR is just one distance, both the left and right sides are padded
1307 evenly. The default is \fB2\fR.
1308 .TP
1309 \fB\-ipady \fIpad\fR
1310 Sets an amount of internal padding to be added to the height of each
1311 legend entry. \fIPad\fR can be a list of one or two screen distances. If
1312 \fIpad\fR has two elements, the top of the entry is padded by the
1313 first distance and the bottom by the second. If \fIpad\fR is just
1314 one distance, both the top and bottom of the entry are padded evenly.
1315 The default is \fB2\fR.
1316 .TP
1317 \fB\-padx \fIpad\fR
1318 Sets the padding to the left and right exteriors of the legend.
1319 \fIPad\fR can be a list of one or two screen distances. If \fIpad\fR
1320 has two elements, the left side of the legend is padded by the first
1321 distance and the right side by the second. If \fIpad\fR has just one
1322 distance, both the left and right sides are padded evenly. The
1323 default is \fB4\fR.
1324 .TP
1325 \fB\-pady \fIpad\fR
1326 Sets the padding above and below the legend. \fIPad\fR can be a list
1327 of one or two screen distances. If \fIpad\fR has two elements, the area above
1328 the legend is padded by the first distance and the area below by the
1329 second. If \fIpad\fR is just one distance, both the top and
1330 bottom areas are padded evenly. The default is \fB0\fR.
1331 .TP
1332 \fB\-position \fIpos\fR
1333 Specifies where the legend is drawn. The
1334 \fB\-anchor\fR option also affects where the legend is positioned. If
1335 \fIpos\fR is \fBleft\fR, \fBleft\fR, \fBtop\fR, or \fBbottom\fR, the
1336 legend is drawn in the specified margin. If \fIpos\fR is
1337 \fBplotarea\fR, then the legend is drawn inside the plotting area at a
1338 particular anchor. If \fIpos\fR is in the form "\fI@x,y\fR", where
1339 \fIx\fR and \fIy\fR are the window coordinates, the legend is drawn in
1340 the plotting area at the specified coordinates. The default is
1341 \fBright\fR.
1342 .TP
1343 \fB\-raised \fIboolean\fR
1344 Indicates whether the legend is above or below the data elements. This
1345 matters only if the legend is in the plotting area. If \fIboolean\fR
1346 is true, the legend will be drawn on top of any elements that may
1347 overlap it. The default is \fBno\fR.
1348 .TP
1349 \fB\-relief \fIrelief\fR
1350 Specifies the 3-D effect for the border around the legend.
1351 \fIRelief\fR specifies how the interior of the legend should appear
1352 relative to the strip chart; for example, \fBraised\fR means the legend
1353 should appear to protrude from the strip chart, relative to the surface of
1354 the strip chart. The default is \fBsunken\fR.
1355 .PP
1356 Legend configuration options may also be set by the \fBoption\fR
1357 command. The resource name and class are \fBlegend\fR and
1358 \fBLegend\fR respectively.
1359 .CS
1360 option add *Stripchart.legend.Foreground blue
1361 option add *Stripchart.Legend.Relief raised
1362 .CE
1363 .RE
1364 .TP
1365 \fIpathName \fBlegend deactivate \fIpattern\fR...
1366 Selects legend entries to be drawn using the normal legend colors and
1367 relief. All entries whose element names match \fIpattern\fR are
1368 selected. To be selected, the element name must match only one
1369 \fIpattern\fR.
1370 .TP
1371 \fIpathName \fBlegend get \fIpos\fR
1372 Returns the name of the element whose entry is at the screen position
1373 \fIpos\fR in the legend. \fIPos\fR must be in the form "\fI@x,y\fR",
1374 where \fIx\fR and \fIy\fR are window coordinates. If the given
1375 coordinates do not lie over a legend entry, \fB""\fR is returned.
1376 .SS "PEN COMPONENTS"
1377 Pens define attributes (both symbol and line style) for elements.
1378 Pens mirror the configuration options of data elements that pertain to
1379 how symbols and lines are drawn. Data elements use pens to determine
1380 how they are drawn. A data element may use several pens at once. In
1381 this case, the pen used for a particular data point is determined from
1382 each element's weight vector (see the element's \fB\-weight\fR and
1383 \fB\-style\fR options).
1384 .PP
1385 One pen, called \fBactiveLine\fR, is automatically created.
1386 It's used as the default active pen for elements. So you can change
1387 the active attributes for all elements by simply reconfiguring this
1388 pen.
1389 .CS
1390 \&.s pen configure "activeLine" -color green
1391 .CE
1392 You can create and use any number of pens. To create a pen, invoke
1393 the pen component and its create operation.
1394 .CS
1395 \&.s pen create myPen
1396 .CE
1397 You map pens to a data element using either the element's
1398 \fB\-pen\fR or \fB\-activepen\fR options.
1399 .CS
1400 \&.s element create "line1" -xdata $x -ydata $tempData \\
1401 -pen myPen
1402 .CE
1403 An element can use several pens at once. This is done by specifying
1404 the name of the pen in the element's style list (see the
1405 \fB\-styles\fR option).
1406 .CS
1407 \&.s element configure "line1" -styles { myPen 2.0 3.0 }
1408 .CE
1409 This says that any data point with a weight between 2.0 and 3.0
1410 is to be drawn using the pen \fBmyPen\fR. All other points
1411 are drawn with the element's default attributes.
1412 .PP
1413 The following operations are available for pen components.
1414 .PP
1415 .TP
1416 \fIpathName \fBpen \fBcget \fIpenName \fIoption\fR
1417 Returns the current value of the option given by \fIoption\fR for
1418 \fIpenName\fR. \fIOption\fR may be any option described below
1419 for the pen \fBconfigure\fR operation.
1420 .TP
1421 \fIpathName \fBpen \fBconfigure \fIpenName \fR?\fIoption value\fR?...
1422 Queries or modifies the configuration options of \fIpenName\fR. If
1423 \fIoption\fR isn't specified, a list describing the current
1424 options for \fIpenName\fR is returned. If \fIoption\fR is specified, but
1425 not \fIvalue\fR, then a list describing \fIoption\fR is
1426 returned. If one or more \fIoption\fR and \fIvalue\fR pairs are
1427 specified, then for each pair, the pen option \fIoption\fR is set to
1428 \fIvalue\fR.
1429 The following options are valid for pens.
1430 .RS
1431 .TP
1432 \fB\-color \fIcolor\fR
1433 Sets the color of the traces connecting the data points.
1434 .TP
1435 \fB\-dashes \fIdashList\fR
1436 Sets the dash style of element line. \fIDashList\fR is a list of up to
1437 11 numbers that alternately represent the lengths of the dashes and
1438 gaps on the element line. Each number must be between 1 and 255. If
1439 \fIdashList\fR is \fB""\fR, the lines will be solid.
1440 .TP
1441 \fB\-fill \fIcolor\fR
1442 Sets the interior color of symbols. If \fIcolor\fR is \fB""\fR, then
1443 the interior of the symbol is transparent. If \fIcolor\fR is
1444 \fBdefcolor\fR, then the color will be the same as the \fB\-color\fR
1445 option. The default is \fBdefcolor\fR.
1446 .TP
1447 \fB\-linewidth \fIpixels\fR
1448 Sets the width of the connecting lines between data points. If
1449 \fIpixels\fR is \fB0\fR, no connecting lines will be drawn between
1450 symbols. The default is \fB0\fR.
1451 .TP
1452 \fB\-offdash \fIcolor\fR
1453 Sets the color of the stripes when traces are dashed (see the
1454 \fB\-dashes\fR option). If \fIcolor\fR is \fB""\fR, then the "off"
1455 pixels will represent gaps instead of stripes. If \fIcolor\fR is
1456 \fBdefcolor\fR, then the color will be the same as the \fB\-color\fR
1457 option. The default is \fBdefcolor\fR.
1458 .TP
1459 \fB\-outline \fIcolor\fR
1460 Sets the color or the outline around each symbol. If \fIcolor\fR is
1461 \fB""\fR, then no outline is drawn. If \fIcolor\fR is \fBdefcolor\fR,
1462 then the color will be the same as the \fB\-color\fR option. The
1463 default is \fBdefcolor\fR.
1464 .TP
1465 \fB\-outlinewidth \fIpixels\fR
1466 Sets the width of the outline bordering each symbol. If \fIpixels\fR
1467 is \fB0\fR, no outline will be drawn. The default is \fB1\fR.
1468 .TP
1469 \fB\-pixels \fIpixels\fR
1470 Sets the size of symbols. If \fIpixels\fR is \fB0\fR, no symbols will
1471 be drawn. The default is \fB0.125i\fR.
1472 .TP
1473 \fB\-symbol \fIsymbol\fR
1474 Specifies the symbol for data points. \fISymbol\fR can be either
1475 \fBsquare\fR, \fBcircle\fR, \fBdiamond\fR, \fBplus\fR, \fBcross\fR,
1476 \fBsplus\fR, \fBscross\fR, \fBtriangle\fR, \fB""\fR (where no symbol
1477 is drawn), or a bitmap. Bitmaps are specified as "\fIsource\fR
1478 ?\fImask\fR?", where \fIsource\fR is the name of the bitmap, and
1479 \fImask\fR is the bitmap's optional mask. The default is
1480 \fBcircle\fR.
1481 .TP
1482 \fB\-type \fIelemType\fR
1483 Specifies the type of element the pen is to be used with.
1484 This option should only be employed when creating the pen. This
1485 is for those that wish to mix different types of elements (bars and
1486 lines) on the same graph. The default type is "line".
1487 .PP
1488 Pen configuration options may be also be set by the \fBoption\fR
1489 command. The resource class is \fBPen\fR. The resource names
1490 are the names of the pens.
1491 .CS
1492 option add *Stripchart.Pen.Color blue
1493 option add *Stripchart.activeLine.color green
1494 .CE
1495 .RE
1496 .TP
1497 \fIpathName \fBpen \fBcreate \fIpenName \fR?\fIoption value\fR?...
1498 Creates a new pen by the name \fIpenName\fR. No pen by the same
1499 name can already exist. \fIOption\fR and \fIvalue\fR are described
1500 in above in the pen \fBconfigure\fR operation.
1501 .TP
1502 \fIpathName \fBpen \fBdelete \fR?\fIpenName\fR?...
1503 Deletes the named pens. A pen is not really
1504 deleted until it is not longer in use, so it's safe to delete
1505 pens mapped to elements.
1506 .TP
1507 \fIpathName \fBpen names \fR?\fIpattern\fR?...
1508 Returns a list of pens matching zero or more patterns. If no
1509 \fIpattern\fR argument is give, the names of all pens are returned.
1510 .SS "POSTSCRIPT COMPONENT"
1511 The strip chart can generate encapsulated PostScript output. There
1512 are several configuration options you can specify to control how the
1513 plot is generated. You can change the page dimensions and
1514 borders. The plot itself can be scaled, centered, or rotated to
1515 landscape. The PostScript output can be written directly to a file or
1516 returned through the interpreter.
1517 .PP
1518 The following postscript operations are available.
1519 .TP
1520 \fIpathName \fBpostscript cget \fIoption\fR
1521 Returns the current value of the postscript option given by
1522 \fIoption\fR. \fIOption\fR may be any option described
1523 below for the postscript \fBconfigure\fR operation.
1524 .TP
1525 \fIpathName \fBpostscript configure \fR?\fIoption value\fR?...
1526 Queries or modifies the configuration options for PostScript
1527 generation. If \fIoption\fR isn't specified, a list describing
1528 the current postscript options for \fIpathName\fR is returned. If
1529 \fIoption\fR is specified, but not \fIvalue\fR, then a list describing
1530 \fIoption\fR is returned. If one or more \fIoption\fR and \fIvalue\fR
1531 pairs are specified, then for each pair, the postscript option
1532 \fIoption\fR is set to \fIvalue\fR. The following postscript options
1533 are available.
1534 .RS
1535 .TP
1536 \fB\-center \fIboolean\fR
1537 Indicates whether the plot should be centered on the PostScript page. If
1538 \fIboolean\fR is false, the plot will be placed in the upper left
1539 corner of the page. The default is \fB1\fR.
1540 .TP
1541 \fB\-colormap \fIvarName\fR
1542 \fIVarName\fR must be the name of a global array variable that
1543 specifies a color mapping from the X color name to PostScript. Each
1544 element of \fIvarName\fR must consist of PostScript code to set a
1545 particular color value (e.g. ``\fB1.0 1.0 0.0 setrgbcolor\fR''). When
1546 outputting color information in PostScript, the array variable \fIvarName\fR
1547 is checked to see if an element of the name of the color exists. If so,
1548 it uses the value of the element as the PostScript
1549 command to set the color. If this option hasn't been specified, or if
1550 there isn't an entry in \fIvarName\fR for a given color, then it uses
1551 the red, green, and blue intensities from the X color.
1552 .TP
1553 \fB\-colormode \fImode\fR
1554 Specifies how to output color information. \fIMode\fR must be either
1555 \fBcolor\fR (for full color output), \fBgray\fR (convert all colors to
1556 their gray-scale equivalents) or \fBmono\fR (convert foreground colors
1557 to black and background colors to white). The default mode is
1558 \fBcolor\fR.
1559 .TP
1560 \fB\-fontmap \fIvarName\fR
1561 \fIVarName\fR must be the name of a global array variable that
1562 specifies a font mapping from the X font name to PostScript. Each
1563 element of \fIvarName\fR must consist of a Tcl list with one or two
1564 elements, which are the name and point size of a PostScript font.
1565 When outputting PostScript commands for a particular font, the
1566 array variable \fIvarName\fR is checked to see an element of the specified
1567 font exists. If there is such an element, then the font
1568 information contained in that element is used in the PostScript
1569 output. (If the point size is omitted from the list, the point size
1570 of the X font is used). Otherwise the X font is examined in an
1571 attempt to guess what PostScript font to use. This works only for
1572 fonts whose foundry property is \fIAdobe\fR (such as Times, Helvetica,
1573 Courier, etc.). If all of this fails then the font defaults to
1574 \fBHelvetica-Bold\fR.
1575 .TP
1576 \fB\-decorations \fIboolean\fR
1577 Indicates if PostScript commands to generate color backgrounds and 3-D
1578 borders should be output. If \fIboolean\fR is false, the background will
1579 be white and no 3-D borders will be generated. The
1580 default is \fB1\fR.
1581 .TP
1582 \fB\-height \fIpixels\fR
1583 Sets the height of the plot. This lets you plot the stripchart with a
1584 height different from the one displayed on the screen. If
1585 \fIpixels\fR is 0, the height is the same as the displayed height.
1586 The default is \fB0\fR.
1587 .TP
1588 \fB\-landscape \fIboolean\fR
1589 If \fIboolean\fR is true, this specifies the printed area is to be
1590 rotated 90 degrees. In non-rotated output the X-axis of the printed
1591 area runs along the short dimension of the page (``portrait''
1592 orientation); in rotated output the X-axis runs along the long
1593 dimension of the page (``landscape'' orientation). Defaults to
1594 \fB0\fR.
1595 .TP
1596 \fB\-maxpect \fIboolean\fR
1597 Indicates to scale the the plot so that it fills the PostScript page.
1598 The aspect ratio of the strip chart is still retained. The default is
1599 \fB0\fR.
1600 .TP
1601 \fB\-padx \fIpad\fR
1602 Sets the horizontal padding for the left and right page borders. The
1603 borders are exterior to the plot. \fIPad\fR can be a list of one or
1604 two screen distances. If \fIpad\fR has two elements, the left border is padded
1605 by the first distance and the right border by the second. If
1606 \fIpad\fR has just one distance, both the left and right borders are
1607 padded evenly. The default is \fB1i\fR.
1608 .TP
1609 \fB\-pady \fIpad\fR
1610 Sets the vertical padding for the top and bottom page borders. The
1611 borders are exterior to the plot. \fIPad\fR can be a list of one or
1612 two screen distances. If \fIpad\fR has two elements, the top border is padded
1613 by the first distance and the bottom border by the second. If
1614 \fIpad\fR has just one distance, both the top and bottom borders are
1615 padded evenly. The default is \fB1i\fR.
1616 .TP
1617 \fB\-paperheight \fIpixels\fR
1618 Sets the height of the postscript page. This can be used to select
1619 between different page sizes (letter, A4, etc). The default height is
1620 \fB11.0i\fR.
1621 .TP
1622 \fB\-paperwidth \fIpixels\fR
1623 Sets the width of the postscript page. This can be used to select
1624 between different page sizes (letter, A4, etc). The default width is
1625 \fB8.5i\fR.
1626 .TP
1627 \fB\-width \fIpixels\fR
1628 Sets the width of the plot. This lets you plot the strip chart with a
1629 width different from the one drawn on the screen. If \fIpixels\fR
1630 is 0, the width is the same as the widget's width. The default is
1631 \fB0\fR.
1632 .PP
1633 Postscript configuration options may be also be set by the
1634 \fBoption\fR command. The resource name and class are
1635 \fBpostscript\fR and \fBPostscript\fR respectively.
1636 .CS
1637 option add *Stripchart.postscript.Decorations false
1638 option add *Stripchart.Postscript.Landscape true
1639 .CE
1640 .RE
1641 .TP
1642 \fIpathName \fBpostscript output \fR?\fIfileName\fR? ?\fIoption value\fR?...
1643 Outputs a file of encapsulated PostScript. If a
1644 \fIfileName\fR argument isn't present, the command returns the
1645 PostScript. If any \fIoption-value\fR pairs are present, they set
1646 configuration options controlling how the PostScript is generated.
1647 \fIOption\fR and \fIvalue\fR can be anything accepted by the
1648 postscript \fBconfigure\fR operation above.
1649 .SS "MARKER COMPONENTS"
1650 Markers are simple drawing procedures used to annotate or highlight
1651 areas of the strip chart. Markers have various types: text strings,
1652 bitmaps, images, connected lines, windows, or polygons. They can be
1653 associated with a particular element, so that when the element is
1654 hidden or un-hidden, so is the marker. By default, markers are the
1655 last items drawn, so that data elements will appear in
1656 behind them. You can change this by configuring the \fB\-under\fR
1657 option.
1658 .PP
1659 Markers, in contrast to elements, don't affect the scaling of the
1660 coordinate axes. They can also have \fIelastic\fR coordinates
1661 (specified by \fB-Inf\fR and \fBInf\fR respectively) that translate
1662 into the minimum or maximum limit of the axis. For example, you can
1663 place a marker so it always remains in the lower left corner of the
1664 plotting area, by using the coordinates \fB-Inf\fR,\fB-Inf\fR.
1665 .PP
1666 The following operations are available for markers.
1667 .TP
1668 \fIpathName \fBmarker after \fImarkerId\fR ?\fIafterId\fR?
1669 Changes the order of the markers, drawing the first
1670 marker after the second. If no second \fIafterId\fR argument is
1671 specified, the marker is placed at the end of the display list. This
1672 command can be used to control how markers are displayed since markers
1673 are drawn in the order of this display list.
1674 .TP
1675 \fIpathName \fBmarker before \fImarkerId\fR ?\fIbeforeId\fR?
1676 Changes the order of the markers, drawing the first
1677 marker before the second. If no second \fIbeforeId\fR argument is
1678 specified, the marker is placed at the beginning of the display list.
1679 This command can be used to control how markers are displayed since
1680 markers are drawn in the order of this display list.
1681 .TP
1682 \fIpathName \fBmarker cget \fIoption\fR
1683 Returns the current value of the marker configuration option given by
1684 \fIoption\fR. \fIOption\fR may be any option described
1685 below in the \fBconfigure\fR operation.
1686 .TP
1687 \fIpathName \fBmarker configure \fImarkerId\fR ?\fIoption value\fR?...
1688 Queries or modifies the configuration options for markers. If
1689 \fIoption\fR isn't specified, a list describing the current
1690 options for \fImarkerId\fR is returned. If \fIoption\fR is specified,
1691 but not \fIvalue\fR, then a list describing \fIoption\fR is returned.
1692 If one or more \fIoption\fR and \fIvalue\fR pairs are specified, then
1693 for each pair, the marker option \fIoption\fR is set to \fIvalue\fR.
1694 .sp
1695 The following options are valid for all markers.
1696 Each type of marker also has its own type-specific options.
1697 They are described in the sections below.
1698 .RS
1699 .TP
1700 \fB\-coords \fIcoordList\fR
1701 Specifies the coordinates of the marker. \fICoordList\fR is
1702 a list of graph coordinates. The number of coordinates required
1703 is dependent on the type of marker. Text, image, and window markers
1704 need only two coordinates (an X\-Y coordinate). Bitmap markers
1705 can take either two or four coordinates (if four, they represent the
1706 corners of the bitmap). Line markers
1707 need at least four coordinates, polygons at least six.
1708 If \fIcoordList\fR is \fB""\fR, the marker will not be displayed.
1709 The default is \fB""\fR.
1710 .TP
1711 \fB\-element \fIelemName\fR
1712 Links the marker with the element \fIelemName\fR. The marker is
1713 drawn only if the element is also currently displayed (see the
1714 element's \fBshow\fR operation). If \fIelemName\fR is \fB""\fR, the
1715 marker is always drawn. The default is \fB""\fR.
1716 .TP
1717 \fB\-hide \fIboolean\fR
1718 Indicates whether the marker is drawn. If \fIboolean\fR is true,
1719 the marker is not drawn. The default is \fBno\fR.
1720 .TP
1721 \fB\-mapx \fIxAxis\fR
1722 Specifies the X\-axis to map the marker's X\-coordinates onto.
1723 \fIXAxis\fR must the name of an axis. The default is \fBx\fR.
1724 .TP
1725 \fB\-mapy \fIyAxis\fR
1726 Specifies the Y\-axis to map the marker's Y\-coordinates onto.
1727 \fIYAxis\fR must the name of an axis. The default is \fBy\fR.
1728 .TP
1729 \fB\-name \fImarkerId\fR
1730 Changes the identifier for the marker. The identifier \fImarkerId\fR
1731 can not already be used by another marker. If this option
1732 isn't specified, the marker's name is uniquely generated.
1733 .TP
1734 \fB\-under \fIboolean\fR
1735 Indicates whether the marker is drawn below/above data
1736 elements. If \fIboolean\fR is true, the marker is be drawn
1737 underneath the data element symbols and lines. Otherwise, the marker is
1738 drawn on top of the element. The default is \fB0\fR.
1739 .TP
1740 \fB\-xoffset \fIpixels\fR
1741 Specifies a screen distance to offset the marker horizontally.
1742 \fIPixels\fR is a valid screen distance, such as \fB2\fR or \fB1.2i\fR.
1743 The default is \fB0\fR.
1744 .TP
1745 \fB\-yoffset \fIpixels\fR
1746 Specifies a screen distance to offset the markers vertically.
1747 \fIPixels\fR is a valid screen distance, such as \fB2\fR or \fB1.2i\fR.
1748 The default is \fB0\fR.
1749 .PP
1750 Marker configuration options may also be set by the \fBoption\fR command.
1751 The resource class is either \fBBitmapMarker\fR, \fBImageMarker\fR,
1752 \fBLineMarker\fR, \fBPolygonMarker\fR, \fBTextMarker\fR, or \fBWindowMarker\fR,
1753 depending on the type of marker. The resource name is the name of the
1754 marker.
1755 .CS
1756 option add *Stripchart.TextMarker.Foreground white
1757 option add *Stripchart.BitmapMarker.Foreground white
1758 option add *Stripchart.m1.Background blue
1759 .CE
1760 .RE
1761 .TP
1762 \fIpathName \fBmarker create \fItype\fR ?\fIoption value\fR?...
1763 Creates a marker of the selected type. \fIType\fR may be either
1764 \fBtext\fR, \fBline\fR, \fBbitmap\fR, \fBimage\fR, \fBpolygon\fR, or
1765 \fBwindow\fR. This command returns the marker identifier,
1766 used as the \fImarkerId\fR argument in the other marker-related
1767 commands. If the \fB\-name\fR option is used, this overrides the
1768 normal marker identifier. If the name provided is already used for
1769 another marker, the new marker will replace the old.
1770 .TP
1771 \fIpathName \fBmarker delete\fR ?\fIname\fR?...
1772 Removes one of more markers. The graph will automatically be redrawn
1773 without the marker.\fR.
1774 .TP
1775 \fIpathName \fBmarker exists \fImarkerId\fR
1776 Returns \fB1\fR if the marker \fImarkerId\fR exists and \fB0\fR
1777 otherwise.
1778 .TP
1779 \fIpathName \fBmarker names\fR ?\fIpattern\fR?
1780 Returns the names of all the markers that currently exist. If
1781 \fIpattern\fR is supplied, only those markers whose names match it
1782 will be returned.
1783 .TP
1784 \fIpathName \fBmarker type \fImarkerId\fR
1785 Returns the type of the marker given by \fImarkerId\fR, such as
1786 \fBline\fR or \fBtext\fR. If \fImarkerId\fR is not a valid a marker
1787 identifier, \fB""\fR is returned.
1788 .SS "BITMAP MARKERS"
1789 A bitmap marker displays a bitmap. The size of the
1790 bitmap is controlled by the number of coordinates specified. If two
1791 coordinates, they specify the position of the top-left corner of the
1792 bitmap. The bitmap retains its normal width and height. If four
1793 coordinates, the first and second pairs of coordinates represent the
1794 corners of the bitmap. The bitmap will be stretched or reduced as
1795 necessary to fit into the bounding rectangle.
1796 .PP
1797 Bitmap markers are created with the marker's \fBcreate\fR operation in
1798 the form:
1799 .DS
1800 \fIpathName \fBmarker create bitmap \fR?\fIoption value\fR?...
1801 .DE
1802 There may be many \fIoption\fR-\fIvalue\fR pairs, each
1803 sets a configuration options for the marker. These
1804 same \fIoption\fR\-\fIvalue\fR pairs may be used with the marker's
1805 \fBconfigure\fR operation.
1806 .PP
1807 The following options are specific to bitmap markers:
1808 .TP
1809 \fB\-background \fIcolor\fR
1810 Sets the background color of the bitmap. If \fIcolor\fR is \fB""\fR,
1811 the background color will be transparent. The default background
1812 color is \fBwhite\fR.
1813 .TP
1814 \fB\-bitmap \fIbitmap\fR
1815 Specifies the bitmap to be displayed. If \fIbitmap\fR is \fB""\fR,
1816 the marker will not be displayed. The default is \fB""\fR.
1817 .TP
1818 \fB\-foreground \fIcolor\fR
1819 Sets the foreground color of the bitmap. The default foreground color
1820 is \fBblack\fR.
1821 .TP
1822 \fB\-mask \fImask\fR
1823 Specifies a mask for the bitmap to be displayed. This mask is a bitmap
1824 itself, denoting the pixels that are transparent. If \fImask\fR is
1825 \fB""\fR, all pixels of the bitmap will be drawn. The default is
1826 \fB""\fR.
1827 .TP
1828 \fB\-rotate \fItheta\fR
1829 Sets the rotation of the bitmap. \fITheta\fR is a real number
1830 representing the angle of rotation in degrees. The marker is first
1831 rotated and then placed according to its anchor position. The default
1832 rotation is \fB0.0\fR.
1833 .SS "IMAGE MARKERS"
1834 A image marker displays an image. Image markers are
1835 created with the marker's \fBcreate\fR operation in the form:
1836 .DS
1837 \fIpathName \fBmarker create image \fR?\fIoption value\fR?...
1838 .DE
1839 There may be many \fIoption\fR-\fIvalue\fR
1840 pairs, each sets a configuration option
1841 for the marker. These same \fIoption\fR\-\fIvalue\fR pairs may be
1842 used with the marker's \fBconfigure\fR operation.
1843 .PP
1844 The following options are specific to image markers:
1845 .TP
1846 \fB\-anchor \fIanchor\fR
1847 \fIAnchor\fR tells how to position the image relative to the
1848 positioning point for the image. For example, if \fIanchor\fR
1849 is \fBcenter\fR then the image is centered on the point; if
1850 \fIanchor\fR is \fBn\fR then the image will be drawn such that
1851 the top center point of the rectangular region occupied by the
1852 image will be at the positioning point.
1853 This option defaults to \fBcenter\fR.
1854 .TP
1855 \fB\-image \fIimage\fR
1856 Specifies the image to be drawn.
1857 If \fIimage\fR is \fB""\fR, the marker will not be
1858 drawn. The default is \fB""\fR.
1859 .SS "LINE MARKERS"
1860 A line marker displays one or more connected line segments.
1861 Line markers are created with marker's \fBcreate\fR operation in the form:
1862 .DS
1863 \fIpathName \fBmarker create line \fR?\fIoption value\fR?...
1864 .DE
1865 There may be many \fIoption\fR-\fIvalue\fR
1866 pairs, each sets a configuration option
1867 for the marker. These same \fIoption\fR-\fIvalue\fR pairs may be
1868 used with the marker's \fBconfigure\fR operation.
1869 .PP
1870 The following options are specific to line markers:
1871 .TP
1872 \fB\-background \fIcolor\fR
1873 Sets the background color of the line.
1874 The option is affects the line color only when the \fB\-stipple\fR option
1875 is set.
1876 If this option isn't specified then it defaults to \fBwhite\fR.
1877 .TP
1878 \fB\-dashes \fIdashList\fR
1879 Sets the dash style of the line. \fIDashList\fR is a list of up to 11
1880 numbers that alternately represent the lengths of the dashes and gaps
1881 on the line. Each number must be between 1 and 255. If
1882 \fIdashList\fR is \fB""\fR, the marker line will be solid.
1883 .TP
1884 \fB\-foreground \fIcolor\fR
1885 Sets the foreground color. The default foreground color is \fBblack\fR.
1886 .TP
1887 \fB\-linewidth \fIpixels\fR
1888 Sets the width of the lines.
1889 The default width is \fB0\fR.
1890 .TP
1891 \fB\-stipple \fIbitmap\fR
1892 Specifies a stipple pattern used to draw the line, rather than
1893 a solid line.
1894 \fIBitmap\fR specifies a bitmap to use as the stipple
1895 pattern. If \fIbitmap\fR is \fB""\fR, then the
1896 line is drawn in a solid fashion. The default is \fB""\fR.
1897 .SS "POLYGON MARKERS"
1898 A polygon marker displays a closed region described as two or more
1899 connected line segments. It is assumed the first and
1900 last points are connected. Polygon markers are created using the
1901 marker \fBcreate\fR operation in the form:
1902 .DS
1903 \fIpathName \fBmarker create polygon \fR?\fIoption value\fR?...
1904 .DE
1905 There may be many \fIoption\fR-\fIvalue\fR
1906 pairs, each sets a configuration option
1907 for the marker. These same \fIoption\fR\-\fIvalue\fR pairs may be
1908 used with the \fBmarker configure\fR command to change the marker's
1909 configuration.
1910 The following options are supported for polygon markers:
1911 .TP
1912 \fB\-dashes \fIdashList\fR
1913 Sets the dash style of the outline of the polygon. \fIDashList\fR is a
1914 list of up to 11 numbers that alternately represent the lengths of
1915 the dashes and gaps on the outline. Each number must be between 1 and
1916 255. If \fIdashList\fR is \fB""\fR, the outline will be a solid line.
1917 .TP
1918 \fB\-fill \fIcolor\fR
1919 Sets the fill color of the polygon. If \fIcolor\fR is \fB""\fR, then
1920 the interior of the polygon is transparent.
1921 The default is \fBwhite\fR.
1922 .TP
1923 \fB\-linewidth \fIpixels\fR
1924 Sets the width of the outline of the polygon. If \fIpixels\fR is zero,
1925 no outline is drawn. The default is \fB0\fR.
1926 .TP
1927 \fB\-outline \fIcolor\fR
1928 Sets the color of the outline of the polygon. If the polygon is
1929 stippled (see the \fB\-stipple\fR option), then this represents the
1930 foreground color of the stipple. The default is \fBblack\fR.
1931 .TP
1932 \fB\-stipple \fIbitmap\fR
1933 Specifies that the polygon should be drawn with a stippled pattern
1934 rather than a solid color. \fIBitmap\fR specifies a bitmap to use as
1935 the stipple pattern. If \fIbitmap\fR is \fB""\fR, then the polygon is
1936 filled with a solid color (if the \fB\-fill\fR option is set). The
1937 default is \fB""\fR.
1938 .SS "TEXT MARKERS"
1939 A text marker displays a string of characters on one or more lines of
1940 text. Embedded newlines cause line breaks. They may be used to
1941 annotate regions of the strip chart. Text markers are created with the
1942 \fBcreate\fR operation in the form:
1943 .DS
1944 \fIpathName \fBmarker create text \fR?\fIoption value\fR?...
1945 .DE
1946 There may be many \fIoption\fR-\fIvalue\fR pairs,
1947 each sets a configuration option for the text marker.
1948 These same \fIoption\fR\-\fIvalue\fR pairs may be used with the
1949 marker's \fBconfigure\fR operation.
1950 .PP
1951 The following options are specific to text markers:
1952 .TP
1953 \fB\-anchor \fIanchor\fR
1954 \fIAnchor\fR tells how to position the text relative to the
1955 positioning point for the text. For example, if \fIanchor\fR is
1956 \fBcenter\fR then the text is centered on the point; if
1957 \fIanchor\fR is \fBn\fR then the text will be drawn such that the
1958 top center point of the rectangular region occupied by the text will
1959 be at the positioning point. This default is \fBcenter\fR.
1960 .TP
1961 \fB\-background \fIcolor\fR
1962 Sets the background color of the text string. If \fIcolor\fR is
1963 \fB""\fR, the background will be transparent. The default is
1964 \fBwhite\fR.
1965 .TP
1966 \fB\-font \fIfontName\fR
1967 Specifies the font of the text. The default is
1968 \fB*-Helvetica-Bold-R-Normal-*-120-*\fR.
1969 .TP
1970 \fB\-foreground \fIcolor\fR
1971 Sets the foreground color of the text. The default is \fBblack\fR.
1972 .TP
1973 \fB\-justify \fIjustify\fR
1974 Specifies how the text should be justified. This matters only when
1975 the marker contains more than one line of text. \fIJustify\fR must be
1976 \fBleft\fR, \fBright\fR, or \fBcenter\fR. The default is
1977 \fBcenter\fR.
1978 .TP
1979 \fB\-padx \fIpad\fR
1980 Sets the padding to the left and right exteriors of the text.
1981 \fIPad\fR can be a list of one or two screen distances. If \fIpad\fR
1982 has two elements, the left side of the text is padded by the first
1983 distance and the right side by the second. If \fIpad\fR has just one
1984 distance, both the left and right sides are padded evenly. The
1985 default is \fB4\fR.
1986 .TP
1987 \fB\-pady \fIpad\fR
1988 Sets the padding above and below the text. \fIPad\fR can be a list of
1989 one or two screen distances. If \fIpad\fR has two elements, the area above the
1990 text is padded by the first distance and the area below by the second.
1991 If \fIpad\fR is just one distance, both the top and bottom areas
1992 are padded evenly. The default is \fB4\fR.
1993 .TP
1994 \fB\-rotate \fItheta\fR
1995 Specifies the number of degrees to rotate the text. \fITheta\fR is a
1996 real number representing the angle of rotation. The marker is first
1997 rotated along its center and is then drawn according to its anchor
1998 position. The default is \fB0.0\fR.
1999 .TP
2000 \fB\-text \fItext\fR
2001 Specifies the text of the marker. The exact way the text is
2002 displayed may be affected by other options such as \fB\-anchor\fR or
2003 \fB\-rotate\fR.
2004 .SS "WINDOW MARKERS"
2005 A window marker displays a widget at a given position.
2006 Window markers are created with the marker's \fBcreate\fR operation in
2007 the form:
2008 .DS
2009 \fIpathName \fBmarker create window \fR?\fIoption value\fR?...
2010 .DE
2011 There may be many \fIoption\fR-\fIvalue\fR
2012 pairs, each sets a configuration option
2013 for the marker. These same \fIoption\fR\-\fIvalue\fR pairs may be
2014 used with the marker's \fBconfigure\fR command.
2015 .PP
2016 The following options are specific to window markers:
2017 .TP
2018 \fB\-anchor \fIanchor\fR
2019 \fIAnchor\fR tells how to position the widget relative to the
2020 positioning point for the widget. For example, if \fIanchor\fR is
2021 \fBcenter\fR then the widget is centered on the point; if \fIanchor\fR
2022 is \fBn\fR then the widget will be displayed such that the top center
2023 point of the rectangular region occupied by the widget will be at the
2024 positioning point. This option defaults to \fBcenter\fR.
2025 .TP
2026 \fB\-height \fIpixels\fR
2027 Specifies the height to assign to the marker's window. If this option
2028 isn't specified, or if it is specified as \fB""\fR, then the window is
2029 given whatever height the widget requests internally.
2030 .TP
2031 \fB\-width \fIpixels\fR
2032 Specifies the width to assign to the marker's window. If this option
2033 isn't specified, or if it is specified as \fB""\fR, then the window is
2034 given whatever width the widget requests internally.
2035 .TP
2036 \fB\-window \fIpathName\fR
2037 Specifies the widget to be managed. \fIPathName\fR must
2038 be a child of the \fBstripchart\fR widget.
2039 .SH "GRAPH COMPONENT BINDINGS"
2040 Specific stripchart components, such as elements, markers and legend
2041 entries, can have a command trigger when event occurs in them, much
2042 like canvas items in Tk's canvas widget. Not all event sequences are
2043 valid. The only binding events that may be specified are those
2044 related to the mouse and keyboard (such as \fBEnter\fR, \fBLeave\fR,
2045 \fBButtonPress\fR, \fBMotion\fR, and \fBKeyPress\fR).
2046 .sp
2047 Only one element or marker can be picked during an event. This means,
2048 that if the mouse is directly over both an element and a marker, only
2049 the uppermost component is selected. This isn't true for legend entries.
2050 Both a legend entry and an element (or marker) binding commands
2051 will be invoked if both items are picked.
2052 .sp
2053 It is possible for multiple bindings to match a particular event.
2054 This could occur, for example, if one binding is associated with the
2055 element name and another is associated with one of the element's tags
2056 (see the \fB\-bindtags\fR option). When this occurs, all of the
2057 matching bindings are invoked. A binding associated with the element
2058 name is invoked first, followed by one binding for each of the element's
2059 bindtags. If there are multiple matching bindings for a single tag,
2060 then only the most specific binding is invoked. A continue command
2061 in a binding script terminates that script, and a break command
2062 terminates that script and skips any remaining scripts for the event,
2063 just as for the bind command.
2064 .sp
•2065 The \fB\-bindtags\fR option for these components controls addition
2066 tag names which can be matched. Implicitly elements and markers
2067 always have tags matching their names. Setting the value of
2068 the \fB\-bindtags\fR option doesn't change this.
2069 .SH "C LANGUAGE API"
2070 You can manipulate data elements from the C language. There
2071 may be situations where it is too expensive to translate the data
2072 values from ASCII strings. Or you might want to read data in a
2073 special file format.
2074 .PP
2075 Data can manipulated from the C language using BLT vectors.
2076 You specify the x and y data coordinates of an element as vectors and
2077 manipulate the vector from C. The strip chart will be redrawn automatically
2078 after the vectors are updated.
2079 .PP
2080 From Tcl, create the vectors and configure the element to use them.
2081 .CS
2082 vector X Y
2083 \&.s element configure line1 -xdata X -ydata Y
2084 .CE
2085 To set data points from C, you pass the values as arrays of doubles
2086 using the \fBBlt_ResetVector\fR call. The vector is reset with the
2087 new data and at the next idle point (when Tk re-enters its event
2088 loop), the strip chart will be redrawn automatically.
2089 .CS
2090 #include <tcl.h>
2091 #include <blt.h>
2092
2093 register int i;
2094 Blt_Vector *xVec, *yVec;
2095 double x[50], y[50];
2096
2097 /* Get the BLT vectors "X" and "Y" (created above from Tcl) */
2098 if ((Blt_GetVector(interp, "X", 50, &xVec) != TCL_OK) ||
2099 (Blt_GetVector(interp, "Y", 50, &yVec) != TCL_OK)) {
2100 return TCL_ERROR;
2101 }
2102
2103 for (i = 0; i < 50; i++) {
2104 x[i] = i * 0.02;
2105 y[i] = sin(x[i]);
2106 }
2107
2108 /* Put the data into BLT vectors */
2109 if ((Blt_ResetVector(xVec, x, 50, 50, TCL_VOLATILE) != TCL_OK) ||
2110 (Blt_ResetVector(yVec, y, 50, 50, TCL_VOLATILE) != TCL_OK)) {
2111 return TCL_ERROR;
2112 }
2113 .CE
2114 See the \fBvector\fR manual page for more details.
2115 .SH SPEED TIPS
2116 There may be cases where the strip chart needs to be drawn and updated as
2117 quickly as possible. If drawing speed becomes a big
2118 problem, here are a few tips to speed up displays.
2119 .TP 2
2120 \(bu
2121 Try to minimize the number of data points. The more data points
2122 the looked at, the more work the strip chart must do.
2123 .TP 2
2124 \(bu
2125 If your data is generated as floating point values, the time required
2126 to convert the data values to and from ASCII strings can be
2127 significant, especially when there any many data points. You can
2128 avoid the redundant string-to-decimal conversions using the C API to
2129 BLT vectors.
2130 .TP 2
2131 \(bu
2132 Data elements without symbols are drawn faster than with symbols.
2133 Set the data element's \fB\-symbol\fR option to \fBnone\fR. If you need to
2134 draw symbols, try using the simple symbols such as \fBsplus\fR and
2135 \fBscross\fR.
2136 .TP 2
2137 \(bu
2138 Don't stipple or dash the element. Solid lines are much faster.
2139 .TP 2
2140 \(bu
2141 If you update data elements frequently, try turning off the
2142 widget's \fB\-bufferelements\fR option. When the strip chart is first
2143 displayed, it draws data elements into an internal pixmap. The pixmap
2144 acts as a cache, so that when the strip chart needs to be redrawn again, and
2145 the data elements or coordinate axes haven't changed, the pixmap is
2146 simply copied to the screen. This is especially useful when you are
2147 using markers to highlight points and regions on the strip chart. But if
2148 the strip chart is updated frequently, changing either the element data or
2149 coordinate axes, the buffering becomes redundant.
2150 .SH LIMITATIONS
2151 Auto-scale routines do not use requested min/max limits as boundaries
2152 when the axis is logarithmically scaled.
2153 .PP
2154 The PostScript output generated for polygons with more than 1500
2155 points may exceed the limits of some printers (See PostScript Language
2156 Reference Manual, page 568). The work-around is to break the polygon
2157 into separate pieces.
2158 .SH "FUTURE INCOMPATIBILITY"
2159 The \fB\-mapped\fR options are obsoleted and will be removed. You can
2160 achieve the same results using the \fB\-hide\fR option instead.
2161 .CS
2162 # Works for now.
2163 \&.s legend configure -mapped no
2164 # Instead use this.
2165 \&.s legend configure -hide yes
•2166 .CE
2167 .SH KEYWORDS
2168 stripchart, graph, widget