<html> <head> <title>Gri: introduction</title> </head> <body bgcolor="#FFFFFF" text="#000000" link="#0000EE" vlink="#551A8B" alink="FF0000"> <!-- newfile Introduction.html "Gri: introduction" "Introduction" --> <!-- @node Introduction, Simple Example, Top, Top --> <a name="Introduction" ></a> <img src="./resources/top_banner.gif" usemap="#navigate_top" border="0"> <table summary="top banner" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="150" valign="top"> <font size=-1> <br> Chapters: </br> <a href="Introduction.html">1: Introduction</a><br> <a href="SimpleExample.html">2: Simple example</a><br> <a href="InvokingGri.html">3: Invocation</a><br> <a href="GettingMoreControl.html">4: Finer Control</a><br> <a href="X-Y.html">5: X-Y Plots</a><br> <a href="ContourPlots.html">6: Contour Plots</a><br> <a href="Images.html">7: Image Plots</a><br> <a href="Examples.html">8: Examples</a><br> <a href="Commands.html">9: Gri Commands</a><br> <a href="Programming.html">10: Programming</a><br> <a href="Environment.html">11: Environment</a><br> <a href="Emacs.html">12: Emacs Mode</a><br> <a href="History.html">13: History</a><br> <a href="Installation.html">14: Installation</a><br> <a href="Bugs.html">15: Gri Bugs</a><br> <a href="TestSuite.html">16: Test Suite</a><br> <a href="Acknowledgments.html">17: Acknowledgments</a><br> <a href="License.html">18: License</a><br> <br> Indices:</br> <a href="ConceptIndex.html"><i>Concepts</i></a><br> <a href="CommandIndex.html"><i>Commands</i></a><br> <a href="BuiltinIndex.html"><i>Variables</i></a><br> </font> <td width="500" valign="top"> <map name="navigate_top"> <area alt="index.html#Top" shape="rect" coords="5,2,218,24" href="index.html#Top"> <area alt="index.html#Top" shape="rect" coords="516,2,532,24" href="index.html#Top"> <area alt="" shape="rect" coords="557,2,573,24" href="index.html"> <area alt="Gri: simple example" shape="rect" coords="581,2,599,24" href="SimpleExample.html"> </map> <map name="navigate_bottom"> <area alt="index.html#Top" shape="rect" coords="5,2,218,24" href="index.html#Top"> <area alt="Gri: simple example" shape="rect" coords="581,2,599,24" href="SimpleExample.html"></map> <h1>1: Introduction</h1> <b>Gri is a programming language for drawing science-style graphs</b>. It is not mouse-driven, and it does not draw business-style graphs (e.g. pie charts, three-dimensional graphs). Gri has substantial power in advanced applications. It has been proven to be easy to learn; for simple applications, the learning curve is less than an hour. Many users regard Gri as the plotting equivalent of the LaTeX document preparation system. <p> <b>Computers Gri works on:</b> unix computers of many types, for example linux, sunOS/solaris, HP, IBM, DEC alpha, and Macintosh machten. It was developed on a solaris platform and linux platforms, so these are best tested. It also works, after a fashion, on windows-style computers. Running Gri is straightforward; just type its name (see <a href="InvokingGri.html#InvokingGri">Invoking Gri</a>). <p> <b>Capabilities of Gri</b> are those scientists commonly want, since Gri was written by a scientist. It is not so useful for business people -- e.g., Gri draws xy graphs (see <a href="X-Y.html#X-yPlots">X-y Plots</a>), contour plots (see <a href="ContourPlots.html#ContourPlots">Contour Plots</a>), and image plots (see <a href="Images.html#Images">Images</a>), but it will not draw pie-charts unless you teach it how. The list of capabilities of Gri is similar to many packages, but unlike many of the other packages, Gri gives you control over line widths, fonts, grayscales, etc. (see <a href="GettingMoreControl.html#GettingMoreControl">Getting More Control</a>), and it is a programming language of moderate power. <p> <b>The Gri drawing metaphor</b> is that of pen on paper. The ink in the pen is opaque. An item drawn in white ink will erase a previously drawn underlying object drawn in black ink. For example, to draw a timeseries curve in which the region between positive data values and the y=0 axis is filled with black ink, you might use (`<font color="#82140F"><code>draw curve filled</code></font>') to draw the timeseries with black ink (the default color), blackening the area between the curve and the lower axis. Then you could load white ink into the pen (using the `<font color="#82140F"><code>set graylevel 1</code></font>' or `<font color="#82140F"><code>set graylevel white</code></font>' command) and white-out a box drawn between the zero line and the lower axis. Then you'd load black ink back into the pen (`<font color="#82140F"><code>set graylevel 0</code></font>') and draw the curve again, so that the negative part would appear again. <p> <b>Input/output</b> in Gri may be interactive or non-interactive. For interactive use, type `<font color="#82140F"><code>gri</code></font>' at the system commandline prompt. For non-interactive use, with Gri commands in a command-file called `<font color="#82140F"><samp>cmd.gri</samp></font>', type `<font color="#82140F"><code>gri cmd.gri</code></font>'. <p> <b>Gri output</b> is in the PostScript page description language. The output is therefore of high quality, device-independent, capable of being inserted into popular text processors (e.g. LaTeX), and easily displayed. <p> <b>Online help:</b> the Gri command `<font color="#82140F"><code>help</code></font>' makes Gri list the first words of all known commands, along with a hint for getting further help. To get more information, type `<font color="#82140F"><code>help</code></font>' followed by a command-name (e.g. `<font color="#82140F"><code>help read</code></font>'). There is also a tiny bit of information stored online and categorized by topic. Get this by typing for example `<font color="82140F"><code>help - strings</code></font>' (see <a href="OnlineHelp.html#OnlineHelp">Online Help</a>). <p> <b>Data analysis</b> in Gri is limited. It has rudimentary data analysis functions, such as regression, column manipulation, smoothing, etc, but it is not intended as an integrated analysis/graphics package. <p> <b>System calls</b> are an easy and important facet of Gri. It is easy to use operating system commands within Gri (see <a href="System.html#System">System</a>; see <a href="OperatingSystem.html#OperatingSystem">Operating System</a>; see <a href="GetEnv.html#GetEnv">Get Env</a>). This allows you to use familiar, powerful tools, and keeps Gri simple. Particularly useful is the ability to read files through operating system filters (see <a href="Open.html#Open">Open</a>). <p> <b>Programming Gri</b> is quite straightforward, and users familiar with other programming languages find it easy. If Gri lacks a drawing method, you can add it fairly easily, since Gri has programming elements such as `<font color="82140F"><code>if</code></font>' statements (see <a href="IfStatements.html#IfStatements">If Statements</a>), `<font color="#82140F"><code>while</code></font>' loops (see <a href="While.html#While">While</a>), facilities for interacting with the user (see <a href="Query.html#Query">Query</a>), and mechanisms for storing numbers in "variables" (see <a href="Variables.html#Variables">Variables</a>), and text strings in "synonyms" (see <a href="Synonyms.html#Synonyms">Synonyms</a>). The Gri syntax can be augmented easily (see <a href="NewCommands.html#AddingNewCommands">Adding New Commands</a>), and these augmentations can be stored in a startup file (see <a href="ResourceFile.html#ResourceFile">Resource File</a>), creating personalized versions of Gri. <p> <b>Manuals:</b> Gri has an online texinfo manual, a PostScript manual, a WWW manual, a <A HREF="http://gri.sourceforge.net/gri-cookbook/index.html"> cookbook </A> and several reference cards. It also has several discussion groups (see <a href="DiscussionGroup.html#DiscussionGroup">Discussion Group</a>). <p> <b>Version Numbering Scheme</b> <p> When you launch Gri interactively (without naming a commandfile, i.e. by just typing `<font color="#82140F"><code>gri</code></font>' at the unix prompt), you'll see something like <p> <TABLE SUMMARY="Example" BORDER="0" BGCOLOR="#efefef" WIDTH="100%"> <TR> <TD> <PRE> <font color="#82140F"> gri - scientific graphic program (version 2.8.0) GPL Copyright 2001 by Dan E. Kelley. <p> Type `help' to view list of commands, or type `show license' to view license. View /usr/local/share/doc/gri/html/index.html or access `gri' INFO node for the online manual. <p> gri: </font></PRE> </TD> </TR> </TABLE> <p> The last line is a prompt, suggesting that you type in Gri commands. You may type `<font color="#82140F"><code>quit</code></font>' to get out of gri. <p> The first line gives the version number. You can also get this by running Gri with the command `<font color="#82140F"><code>gri -v</code></font>'. Version numbers have three numbers separated by periods. The first number increments for major changes, the second for smaller changes, the third for still smaller changes. The second number also indicates whether a copy is an experimental version or a more reliable release version. Experimental versions have the second digit being an odd integer, while release versions have this digit being even. <p> </table> <img src="./resources/bottom_banner.gif" usemap="#navigate_bottom" border="0"> </body> </html>