la composition (avec GMT)

As a design choice, vfplot plots only the arrows, it is not a general-purpose plotting program. The EPS vector output can be converted to other vector formats which could then be imported into various software (any notes from users doing this would be appreciated and could be added to this documentation).

I rather like GMT, the Generic Mapping tools, a collection of command-line tools for manipulating, projecting and plotting data, typically but not necessarily geographical.

The script below is typical, we set up some variables to hold the GMT range (-R) and projection (-J) options, then call grdsample to increase the resolution of a scalar background in grd/scalar.grd, then plotting the result with grdimage. We make a call to psxy to plot the circle at the origin of the plot.

It is the call to psimage which adds the vfplot arrows layer, see the -D option to position and scale the arrows to align with the rest of the plot.

Finally with the calls to psconvert convert the EPS plot to PDF (with -Tf) for inclusion in a document, and to PNG (with -Tg) for display on the web.

More details (and the result), see the rotating cylinder example plot.

#!/bin/sh

set -e

EXT='0.03125'
RNG="-R-$EXT/$EXT/-$EXT/$EXT"
DIM='4i/4i'
PRJ="-JX$DIM"

EPS='compose.eps'

# background scaler

GRD='/tmp/scalar-fine.grd'
grdsample grd/scalar.grd -G$GRD $RNG -I1024+n
grdimage $GRD $PRJ $RNG -Cscalar.cpt -K > $EPS
rm -f $GRD

# central cylinder

psxy $PRJ $RNG -Sc1.27i -G255 -W1p -K -O >> $EPS <<EOF
0 0
EOF

# vfplot output

psimage vfplot.eps -W$DIM -Dx0/0 -O >> $EPS

# results

psconvert -A -Tf $EPS
psconvert -A -E150 -Tg $EPS