2: Simple example
4: Finer Control
5: X-Y Plots
6: Contour Plots
7: Image Plots
9: Gri Commands
12: Emacs Mode
15: Gri Bugs
16: Test Suite
17: Gri in Press
10.13: Debugging Gri Programs
Here are some hints for debugging Gri programs:
If no data appear on an xy plot, insert `
show columns statistics'
show columns' after the `
read columns' command. It may be
that you have fixed your axes, and that the axes frame does not include
If you get an error message, rerun your Gri program using the
-trace' command-line option, to see which line is causing the
problem. This often reveals logic errors (e.g. in (`
statements). You may also turn tracing on or off at any point in your
Gri program by setting the built-in variable `
..trace..' to 1 or 0.
Many Gri users have the Gri command aliased to be in trace mode by
If Gri complains of a syntax error, consult the printed manual, one of
the online manuals, or the online help facility (see Online Help).
Check the version number (printed at startup) to see if a new version of
Gri has been installed, and check the manual for known incompatabilities.
show' commands throughout your program, to see what's
happening. Even when you are sure your program works, it is a good idea
to embed `
show' statements so are they executed if the
-debug' flag is set:
show "X=" .x. "and label is `\label'"
If your `
draw' commands don't draw anything, check to see
whether you've fooled yourself by enforcing an improper scaling; remove
explict scaling (`
set x axis ...'), clipping (`
set clip'), data
selection windows (`
set input data window x|y') and missing values
set missing value'). Another trick is to read only a portion of
the data set (`
read columns 10 x y') and then print out all the
If you determine that the bug is in Gri, not in your program, please
report the bug, so that other users will not have the same hassle;
(see Reporting Bugs).