# Graphs and plots

Gretl Manual: Gnu Regression, Econometrics and Time-series Library
Prev |  | Next

# Chapter 8. Graphs and plots

# Gnuplot graphs

A separate program, `gnuplot`, is called to generate graphs. Gnuplot is a very full-featured graphing program with myriad options. It is available from www.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 a subset of gnuplot's options and it tries to choose sensible values for you; it also allows you to take complete control over graph details if you wish.

With a graph displayed, you can click on the graph window for a pop-up menu with the following options.

- Save as PNG: Save the graph in Portable Network Graphics format.

- Save as postscript: Save in encapsulated postscript (EPS) format.

- Save as Windows metafile: Save in Enhanced Metafile (EMF) format.

- Save to session as icon: The graph will appear in iconic form when you select "Icon view" from the Session menu.

- Zoom: Lets you select an area within the graph for closer inspection (not available for all graphs).

- Print: On the Gnome desktop only, lets you print the graph directly.

- Copy to clipboard: MS Windows only, lets you paste the graph into Windows applications such as MS Word.[1]

- Edit: Opens a controller for the plot which lets you adjust various aspects of its appearance.

- Close: Closes the graph window.

If you know something about `gnuplot` and wish to get finer control over the appearance of a graph than is available via the graphical controller ("Edit" option), you have two further options.

- Once the graph is saved as a session icon, you can right-click on its icon for a further pop-up menu. One of the otions here is "Edit plot commands", which opens an editing window with the actual gnuplot commands displayed. You can edit these commands and either save them for future processing or send them to gnuplot (with the "File/Send to gnuplot" menu item in the plot commands editing window).

- Another way to save the plot commands (or to save the displayed plot in formats other than EPS or PNG) is to use "Edit" item on a graph's pop-up menu to invoke the graphical controller, then click on the "Output to file" tab in the controller. You are then presented with a drop-down menu of formats in which to save the graph.

To find out more about `gnuplot` see the online manual or www.gnuplot.info.

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

Figure 8-1. gretl's gnuplot controller

### Notes

[1] | For best results when pasting graphs into MS Office applications, choose the application's "Edit, Paste Special..." menu item, and select the option "Picture (Enhanced Metafile)".

Prev | Home | Next
Illustration: the Penn World Table |  | Boxplots