Actions
Gnuplot » Historique » Révision 3
« Précédent |
Révision 3/5
(diff)
| Suivant »
François Rioult, 03/02/2011 20:14
Gnuplot¶
Synopsis¶
This operator has no parameter, two inputs (the GNUplot script and the data) and one output (the plot). It launches GNUplot for generating a .PNG image.
Parameters¶
None.
Inputs¶
2 input files :- the first is the
GNUplotscript. This script uses a@file@ string, that is dynamically replaced with the real name by the script. - the second is the data to be plot.
Outputs¶
1 output: the .PNG image representing the plot.
Shell Code¶
#!/bin/bash
# this shell uses gnuplot with the script as first input on the data
# on the second output
# the @file@ string in the gnuplot script is replaced by the data file.
script=$1; shift
data=`echo $1 | sed 's/\//\\\\\//g'`; shift
output=$1; shift
(
echo "set terminal png"
echo "set output '$output'"
sed "s/@file@/$data/g" $script
) > $script.plot
gnuplot $script.plot
rm $script.plot
Example¶
This operator is used plotting the results in the stream Data mining complexity.
Mis à jour par François Rioult il y a plus de 14 ans · 3 révisions