- publishing free software manuals
The Org Mode 7 Reference Manual
by Carsten Dominik and others
Paperback (6"x9"), 282 pages
ISBN 9781906966089
RRP £9.95 ($14.95)

Sales of this book support the Org project! Get a printed copy>>>

15.9 Org-Plot

Org-Plot can produce 2D and 3D graphs of information stored in org tables using ‘Gnuplot’(133) and ‘gnuplot-mode’(134). To see this in action, ensure that you have both Gnuplot and Gnuplot mode installed on your system, then call org-plot/gnuplot on the following table.

#+PLOT: title:"Citas" ind:1 deps:(3) type:2d with:histograms \(135)
        set:"yrange [0:]"
| Sede      | Max cites | H-index |
| Chile     |    257.72 |   21.39 |
| Leeds     |    165.77 |   19.68 |
| Sao Paolo |     71.00 |   11.50 |
| Stockholm |    134.19 |   14.33 |
| Morelia   |    257.56 |   17.67 |

Notice that Org Plot is smart enough to apply the table's headers as labels. Further control over the labels, type, content, and appearance of plots can be exercised through the #+PLOT: lines preceding a table. See below for a complete list of Org-plot options. For more information and examples see the Org-plot tutorial at http://orgmode.org/worg/org-tutorials/org-plot.php.

Plot Options

Specify any gnuplot option to be set when graphing.
Specify the title of the plot.
Specify which column of the table to use as the x axis.
Specify the columns to graph as a Lisp style list, surrounded by parentheses and separated by spaces for example dep:(3 4) to graph the third and fourth columns (defaults to graphing all other columns aside from the ind column).
Specify whether the plot will be 2d, 3d, or grid.
Specify a with option to be inserted for every col being plotted (e.g. lines, points, boxes, impulses, etc...). Defaults to lines.
If you want to plot to a file, specify "path/to/desired/output-file".
List of labels to be used for the deps (defaults to the column headers if they exist).
Specify an entire line to be inserted in the Gnuplot script.
When plotting 3d or grid types, set this to t to graph a flat mapping rather than a 3d slope.
Specify format of Org-mode timestamps as they will be parsed by Gnuplot. Defaults to ‘%Y-%m-%d-%H:%M:%S’.
If you want total control, you can specify a script file (place the file name between double-quotes) which will be used to plot. Before plotting, every instance of $datafile in the specified script will be replaced with the path to the generated data file. Note: even if you set this option, you may still want to specify the plot type, as that can impact the content of the data file.
ISBN 9781906966089The Org Mode 7 Reference ManualSee the print edition