Allows users to plot data and functions using GnuPlot
Gnuplot is a portable graphing utility. It was originally
created to allow scientists and students to visualize mathematical functions
and data interactively, but has grown to support many non-interactive uses such
as web scripting. It is also used as a plotting engine by third-party
applications like Octave. Gnuplot has been supported and under active
development since 1986.
See the full documentation of gnuplot itself at http://www.gnuplot.info/documentation.html
Images are generated using the
macro. It can either read the plot script from a named section or from a plot script attached to a topic.
| name of section in
mode="section"; name of attachment in
| specifies the mode of operation
| name of the topic where to attach the output of gnuplot
|| current topic
| name of a topic to read a section (or attachment) from
|| current topic
| terminal and file type being generated; note that not all terminal types of gnuplot make sense online
| width of the image being generated
| height of the image being generated
| geometry of the image being generated; values
fixed only make sense for
$width x $height
| format string to render the output image
<img src='$url' class='gnuPlotImage' id='gnuplot$name' alt='$name' width='$width' height='$height' />
string may use the following variables:
$url: url to the image file being created
$web: web name where the image has been created
$topic: topic name where the image has been attached
$file: file name of the image
$name: name of the source image
$width: width of the image being created
In addition to the normal gnuplot syntax for plot scripts, they might contain Foswiki makros which are expanded in the context of the
To reference data files attached to a plot script the variables
are supported to properly determine the location of those.
For example below "Damped Sinus" script looks like this:
set title "Damped Sinus"
set xlabel "X Axis Label"
set ylabel "Y Axis Label"
The following images are examples of plots generated by GnuPlot:
Simple function test
Error: Exception 430: unable to open file '/tmp/magick-20219Gd8y7fUkJW4S': No such file or directory @ error/constitute.c/ReadImage/596
Multi graphs with errorbars, datafile based
Error: Exception 430: unable to open file '/tmp/magick-20219aPcDTHMVfzt3': No such file or directory @ error/constitute.c/ReadImage/596
Map of Denmark, datafile based (data from CIA World Data Bank II)
Error: Exception 430: unable to open file '/tmp/magick-20219_AlGpPo7uu7d': No such file or directory @ error/constitute.c/ReadImage/596
Interlocking Tori (3D)
Blue Whale (3D), datafile based
Alternative GnuPlot render sizes, Rosenbrock Function
Error: Exception 430: unable to open file '/tmp/magick-20219Bk_QfQyFdxLK': No such file or directory @ error/constitute.c/ReadImage/596
You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.
Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".
If you have any problems, or if the extension isn't available in
, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions
for more help.