Chapter 7. Graphs and plots

Table of Contents
Gnuplot graphs
Boxplots

Gnuplot graphs

A separate program, namely gnuplot, is called to generate graphs. Gnuplot is a very full-featured graphing program with myriad options. It is available from gnuplot.info (but note that a copy of gnuplot is bundled with the MS Windows version of gretl). gretl gives you direct access, via a graphical interface, to only a small subset of gnuplot's options but it tries to choose sensible values for you; it also allows you to take complete control over graph details if you wish.

Under MS Windows you can click at the top left corner of a graph window for a pull-down gnuplot menu that lets you choose various things (including copying the graph to the Windows clipboard and sending it to a printer).

For full control over a graph, follow this procedure:

  1. Close the graph window.

  2. From the Session menu, choose "Add last graph".

  3. In the session icon window, right-click on the new graph icon and choose either "Edit using GUI" or "Edit plot commands".

The "Edit using GUI" item pops up a graphical controller for gnuplot which lets you fine-tune various aspects of the graph. The "Edit plot commands" item opens an editor window containing the actual gnuplot command file for generating the graph: this gives you full control over graph details — if you know something about gnuplot. To find out more, see the gnuplot online manual or gnuplot.info.

See also the entry for gnuplot in Chapter 10 below — and the graph and plot commands for "quick and dirty" ASCII graphs.

Figure 7-1. gretl's gnuplot controller