NAME

xdoplot - An easy-to-use wrapper program for Gnuplot

SYNOPSIS

  xdoplot [-vds] [-t device] [-I dir] file...

DESCRIPTION

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.

OPTIONS

-v

Enable verbose mode.

-d

Enable debug mode; without invoking gnuplot, dump gnuplot commands to be executed in the standard output.

-s

Use splot (3D plotting command) instead of plot (2D plotting command). By default, plot (2D plotting) is used.

-t device

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.

d

dumb

e

postscript eps enhanced $PS_COLOR "$PS_FONT_NAME" $PS_FONT_SIZE

p

postscript $PS_COLOR

f

file

t

tgif

a

aifm

g

png

-I dir

Add dir to the include directory for cpp.

COMMANDS

title: string [-- options]

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.

xlabel: string [-- 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.

ylabel: string [-- 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.

option: string

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.

eval: expression

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.

show: [n [,n]...]

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.

fit: [n [,n]...]

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.

name: string

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.

EXAMPLE USAGE

- By default, xdoplot plots a 2D graph with X11
  xdoplot file.res
- xdoplot supports a gzip'ed data file
  xdoplot file.res.gz
- Save the output in the EPS (Encapsulated PostScript) format
  xdoplot -te file.res >file.eps
- xdoplot can include external files from other directories
  xdoplot -I.. -I../macro file.res

EXAMPLE DATA FILE

- macro.def
  #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)
- time-queue.def
  #include "macro.def"
  xlabel: time [s]
  ylabel: queue Length [packet]
  option: set style data linespoints
  option: set key top right
- file.res
  #include "time-queue.def"
  option: set xrange [0:1]
  option: set yrange [0:10]
  show: 1, 3

  name: maxp = 0.1, tau = 0.1
  0.0   0
  0.1   4
  0.2   3
  0.3   8
  0.4   12

  name: maxp = 0.2, tau = 0.1
  0.0   0
  0.1   3
  0.2   7
  0.3   2
  0.4   5

  name: maxp = 0.3, tau = 0.1
  0.0   0
  0.1   3
  0.2   2
  0.3   4
  0.4   2

AVAILABILITY

The latest version of xdoplot is available at

https://lsnl.jp/~ohsaki/software/xdoplot/xdoplot

AUTHOR

Hiroyuki Ohsaki <ohsaki[atmark]lsnl.jp>