Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Overbey2008-08-27 21:45:13 +0000
committerJeffrey Overbey2008-08-27 21:45:13 +0000
commit58ac9594d290a2c4946867744652015d98d38689 (patch)
tree4679e0cdc70064c2daf9c6ce405bb09021655d8e
parent6a01553e5c9d3c8de214cc0894eb90f662318da4 (diff)
downloadorg.eclipse.photran-58ac9594d290a2c4946867744652015d98d38689.tar.gz
org.eclipse.photran-58ac9594d290a2c4946867744652015d98d38689.tar.xz
org.eclipse.photran-58ac9594d290a2c4946867744652015d98d38689.zip
Made viz shell script more readable
-rw-r--r--org.eclipse.photran-samples/jacobi-viz.sh19
1 files changed, 17 insertions, 2 deletions
diff --git a/org.eclipse.photran-samples/jacobi-viz.sh b/org.eclipse.photran-samples/jacobi-viz.sh
index 0aa22e81..12655018 100644
--- a/org.eclipse.photran-samples/jacobi-viz.sh
+++ b/org.eclipse.photran-samples/jacobi-viz.sh
@@ -1,6 +1,16 @@
#!/bin/sh
+#
+# Runs src-jacobi-3-loops/a.exe, which outputs a 2-D matrix of real numbers,
+# and then feeds this matrix to gnuplot to generate a visualization, which
+# is saved as jacobi-viz.gif.
+#
+# J. Overbey 8/27/08
+#
+
src-jacobi-3*/a.exe >data
+
cat <<EOF | gnuplot
+#==GNUPLOT INPUT=================================================================
set term gif
set output "jacobi-viz.gif"
@@ -8,9 +18,9 @@ set output "jacobi-viz.gif"
set pm3d map # 1b. Display a 2-D color gradient rather than the 3-D visualization
#set pm3d at b # 1c. Display a 2-D color gradient under the 3-D visualization
- # 2a. Nothing = Black to yellow via blue and red
+# # 2a. Nothing = Black to yellow via blue and red
#set palette model XYZ functions gray**0.35, gray**0.5, gray**0.8 # 2b. Brown to yellow
- set palette model XYZ functions gray**0.3, gray**0.5, 0 # 2b. Dark red to yellow (Jeff)
+ set palette model XYZ functions gray**0.3, gray**0.5, 0 # 2b. Dark red to yellow (Jeff)
#set palette model XYZ functions gray**0.8, gray**0.5, gray**0.35 # 2c. Green to yellow
#set palette rgbformulae 21,22,23 # 2d. Black to red to yellow to white
#set palette rgbformulae 22,13,-31 # 2e. Blue to green to yellow to red
@@ -18,9 +28,14 @@ set output "jacobi-viz.gif"
splot 'data' matrix notitle # 3a. Plot normally
#splot 'data' matrix notitle with pm3d # 3b. Colorize the 3-D visualization (set 1a above)
+
+#================================================================================
EOF
+
rm -f data
+
echo "Visualization saved as jacobi-viz.gif"
+
if [ `uname -s` == "Darwin" ]; then
open jacobi-viz.gif
elif [ `which eog` != "" ]; then

Back to the top