2008-07-09 22:04:48 +08:00
|
|
|
#! /bin/bash
|
|
|
|
WHAT=$1
|
|
|
|
DIR=$2
|
|
|
|
cat ../${WHAT}.hh > ${WHAT}.gnuplot
|
|
|
|
|
|
|
|
DATA_FILE=`cat ../order_lib`
|
|
|
|
|
|
|
|
echo plot \\ >> $WHAT.gnuplot
|
|
|
|
|
|
|
|
for FILE in $DATA_FILE
|
|
|
|
do
|
|
|
|
LAST=$FILE
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
for FILE in $DATA_FILE
|
|
|
|
do
|
2008-07-11 02:28:50 +08:00
|
|
|
if [ $FILE != $LAST ]
|
|
|
|
then
|
|
|
|
echo "'"$FILE"'" ",\\" >> $WHAT.gnuplot
|
|
|
|
fi
|
2008-07-09 22:04:48 +08:00
|
|
|
done
|
|
|
|
echo "'"$LAST"'" >> $WHAT.gnuplot
|
|
|
|
|
|
|
|
echo set term postscript color >> $WHAT.gnuplot
|
|
|
|
echo set output "'"../${DIR}/$WHAT.ps"'" >> $WHAT.gnuplot
|
2008-07-11 02:28:50 +08:00
|
|
|
# echo set term pdf color >> $WHAT.gnuplot
|
|
|
|
# echo set output "'"../${DIR}/$WHAT.pdf"'" >> $WHAT.gnuplot
|
|
|
|
# echo set term png truecolor size 1024,768 >> $WHAT.gnuplot
|
|
|
|
# echo set output "'"../${DIR}/$WHAT.png"'" >> $WHAT.gnuplot
|
2008-07-09 22:04:48 +08:00
|
|
|
echo plot \\ >> $WHAT.gnuplot
|
|
|
|
for FILE in $DATA_FILE
|
|
|
|
do
|
2008-07-11 02:28:50 +08:00
|
|
|
if [ $FILE != $LAST ]
|
|
|
|
then
|
|
|
|
echo "'"$FILE"'" ",\\" >> $WHAT.gnuplot
|
|
|
|
fi
|
2008-07-09 22:04:48 +08:00
|
|
|
done
|
|
|
|
echo "'"$LAST"'" >> $WHAT.gnuplot
|
|
|
|
|
|
|
|
gnuplot -persist < $WHAT.gnuplot
|
|
|
|
|
|
|
|
rm $WHAT.gnuplot
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|