xdoplot - An easy-to-use wrapper program for Gnuplot
xdoplot [-vds] [-t device] [-I dir] file...
This manual page documents xdoplot. This program is a simple wrapper program for gnuplot, a command-driven interactive function plotting program. Although its usage is limited to either 2D or 3D graph, xdoplot makes it much easier for users to use gnuplot and enhances its features in the following ways.
First, the most distinguishing feature of xdoplot is that the input
file for xdoplot can store both gnuplot commands and data for
multiple lines, whereas gnuplot usually requires separate files
for gnuplot commands and every data line. gnuplot supports
inline data by specifying '-' as a data file, but its usage is
cumbersome and not handy. On the contrary, the data format of
xdoplot is simple and straightforward.
Second, xdoplot is well-suited for non-interactive uses. With xdoplot, the output device can be easily switched using -t option, which is convenient for plotting in, for instance, the PostScript format.
Third, xdoplot supports gzip-compressed data files for saving
disk space, and inclusion of external files and macro expansion using
cpp, a pre-processor program for standard C compilers. This
pre-processor feature enables conditional operation using #ifdef
and #endif directives, and function definition using #define
directive. Moreover, using #include directive makes maintaining a
number of data files quite easy.
xdoplot is a simple wrapper program for gnuplot. For detailed usage, please consult gnuplot document and manual page.
Enable verbose mode.
Enable debug mode; without invoking gnuplot, dump gnuplot commands to be executed in the standard output.
Use splot (3D plotting command) instead of plot (2D plotting
command). By default, plot (2D plotting) is used.
Set output device to device. Any valid output devices in
gnuplot can be specified. The default output device is x11.
For convenience, xdoplot supports the following abbreviations.
dumb
postscript eps enhanced $PS_COLOR "$PS_FONT_NAME" $PS_FONT_SIZE
postscript $PS_COLOR
file
tgif
aifm
png
Add dir to the include directory for cpp.
Specify the title text as string, followed by its options
options (e.g., positional offsets, font family, and font size).
See help title in gnuplot for details of the title format and
its options.
Specify the xlabel text as string, followed by its options
options (e.g., positional offsets, font family, and font size).
See help xlabel in gnuplot for details of the xlabel format and
its options.
Specify the ylabel text as string, followed by its options
options (e.g., positional offsets, font family, and font size).
See help ylabel in gnuplot for details of the ylabel format and
its options.
Specify global and local options. In the header block (i.e., before
the first occurrence of name) , all strings specified by options
are global options, which will be directly passed to gnuplot. In
the data block, all strings specified by options are local options,
which will be inserted after the data file of plot/splot command.
For each line of the data block, expression is executed before
writing to a temporary file. expression can be an arbitrary Perl
expression. expression can access and overwrite the variable
@_, which stores values for each column.
Select and deselect data blocks to be plotted. If show: command is omitted, xdoplot plots all lines. Note that the first data block is numbered as 1.
Plot fitted lines (regression line) for specified data blocks. If fit: command is omitted, xdoplot plots not fitted line. Note that the first data block is numbered as 1.
This command specifies the beginning of a data block, and its
corresponding line title as string. See help plot title in
gnuplot for details of the title format.
xdoplot file.res
xdoplot file.res.gz
xdoplot -te file.res >file.eps
xdoplot -I.. -I../macro file.res
#define bold(x) {/Helvetica-Bold x}
#define italic(x) {/Helvetica-Oblique x}
#define symbol(x) {/Symbol x}
#define maxp italic(max_p)
#define minth italic(min_{th})
#define maxth italic(max_{th})
#define wq italic(w_q)
#define tau symbol(t)
#include "macro.def" xlabel: Time [s] ylabel: Queue Length [packet] option: set data style linespoints option: set key bottom right
#include "time-queue.def" option: set xrange [0:1] option: set yrange [0:10] show: 1, 3
name: maxp = 0.1, minth = 5, maxth = 15, tau = 0.1 0.0 0 0.1 4 0.2 3 0.3 8 0.4 12
name: maxp = 0.2, minth = 5, maxth = 15, tau = 0.1 0.0 0 0.1 3 0.2 7 0.3 2 0.4 5
name: maxp = 0.3, minth = 5, maxth = 15, tau = 0.1 0.0 0 0.1 3 0.2 2 0.3 4 0.4 2
The latest version of xdoplot is available at
http://www.ispl.jp/~oosaki/software/xdoplot/xdoplot
Hiroyuki Ohsaki <oosaki[atmark]ist.osaka-u.ac.jp>