From fec0b9c927784cdad3beca56934070fbb98ebb87 Mon Sep 17 00:00:00 2001 From: James Goppert <jgoppert@l1.hsl.dynalias.com> Date: Tue, 16 Aug 2011 17:10:19 -0400 Subject: [PATCH] Working on post processing script. --- src/utilities/post_process.sh | 24 +++++++++++++++++++----- src/utilities/prep_plot.cpp | 9 +++++---- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/utilities/post_process.sh b/src/utilities/post_process.sh index 36a4f93..537f430 100755 --- a/src/utilities/post_process.sh +++ b/src/utilities/post_process.sh @@ -1,5 +1,19 @@ -#!/bin/tcsh -foreach file (*.csv) - if (-f data_plot/$file:r.xml) prep_plot $file --plot=data_plot/$file:r.xml | gnuplot -end -gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=output.pdf *.ps +#!/bin/bash + +# prepare plots from data +for file in $(ls *.csv) +do + echo $file + if [ -f data_plot/$file:r.xml ] + then + echo preparing plot for: $file + prep_plot $file --plot=data_plot/$file:r.xml | gnuplot + fi +done + +# convert ps to pdf +for file in $(ls *.ps) +do + gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$file.pdf $file +done +# vim:ts=4:sw=4:expandtab diff --git a/src/utilities/prep_plot.cpp b/src/utilities/prep_plot.cpp index 9b25c7d..c49fbe9 100755 --- a/src/utilities/prep_plot.cpp +++ b/src/utilities/prep_plot.cpp @@ -198,10 +198,11 @@ int main(int argc, char **argv) cout << "set size 1.0,1.0" << endl; cout << "set origin 0.0,0.0" << endl; - cout << "set lmargin 6" << endl; - cout << "set rmargin 4" << endl; - cout << "set tmargin 1" << endl; - cout << "set bmargin 1" << endl; + // the default margins work better + //cout << "set lmargin 6" << endl; + //cout << "set rmargin 4" << endl; + //cout << "set tmargin 1" << endl; + //cout << "set bmargin 1" << endl; cout << "set datafile separator \",\"" << endl; cout << "set grid xtics ytics" << endl; -- GitLab