From: Michal Sojka Date: Fri, 18 Jan 2008 16:52:52 +0000 (+0100) Subject: Added -o option to plot command. Renamed some variables. X-Git-Url: https://rtime.felk.cvut.cz/gitweb/frescor/fwp.git/commitdiff_plain/926acafc1a538a108226ae14e79b9a7c57887c72 Added -o option to plot command. Renamed some variables. --- diff --git a/wme_test/plot b/wme_test/plot index 53d4271..f6c9b65 100755 --- a/wme_test/plot +++ b/wme_test/plot @@ -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