]> rtime.felk.cvut.cz Git - frescor/fwp.git/commitdiff
Added -o option to plot command. Renamed some variables.
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 18 Jan 2008 16:52:52 +0000 (17:52 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 18 Jan 2008 16:52:52 +0000 (17:52 +0100)
wme_test/plot

index 53d4271d08bedc983a007f57674e8b54077ce4f5..f6c9b65ee8747ad7db8f310397602a6849445117 100755 (executable)
@@ -4,19 +4,20 @@ SET_TERM_TEMPLATE='set term push; set term x11 enhanced; set term wxt enhanced;
 
 DELAY_BOUND="[]"
 
-while getopts d:espP opt
+while getopts d:eso:pP opt
 do
     case $opt in
        d) DELAY_BOUND="[0:$OPTARG]";;
        e) SET_TERM_TEMPLATE='set term postscript color eps enhanced; set output "${FILE}.eps"';;
        s) SET_TERM_TEMPLATE='set term svg enhanced; set output "${FILE}.svg"';;
+       o) MULTIPDF_FILENAME=$OPTARG;;
        p)
            SET_TERM_TEMPLATE='set term postscript color landscape enhanced'
            PDF_OUTPUT=1
            ;;
        P)
            SET_TERM_TEMPLATE='set term postscript color landscape enhanced'
-           SINGLE_PDF=1
+           MULTIPLE_GRAPHS_IN_PDF=1
            GNUPLOT_CMD_FILE=plot_commands.$$
            rm -f ${GNUPLOT_CMD_FILE}
            ;;
@@ -39,7 +40,7 @@ do
     TITLE="${COMMAND}\n\n${STREAMS}"
 
     SET_TERM=$(echo $SET_TERM_TEMPLATE|sed -e s/\${FILE}/$FILE/)
-    if [ -n "$SINGLE_PDF" ]; then
+    if [ -n "$MULTIPLE_GRAPHS_IN_PDF" ]; then
        CMD="cat >>$GNUPLOT_CMD_FILE"
     elif [ -n "$PDF_OUTPUT" ]; then
        CMD="cat | gnuplot | ps2pdf - ${FILE}.pdf"
@@ -62,7 +63,7 @@ plot $DELAY_BOUND \
 EOF
 done
 
-if [ -n "$SINGLE_PDF" ]; then
-    gnuplot $GNUPLOT_CMD_FILE|ps2pdf - all.pdf
+if [ -n "$MULTIPLE_GRAPHS_IN_PDF" ]; then
+    gnuplot $GNUPLOT_CMD_FILE|ps2pdf - $MULTIPDF_FILENAME
     rm -f $GNUPLOT_CMD_FILE
 fi