Hello
I have a servlet which calls GnuPlot to run in batch to generate a graph from
instructions and data files passed to it. The servlet then displays the graph
to the user.
What I want to know is, if an exception is detected by GnuPlot during it's
processing of the instructions causing the generation of the graph to fail, is
it possible to catch this in code and possibly report what that error is?
For example, when running manually:
set title "" 0, 0, 0 font "arial, 12"
show title
set xlabel "Accelera" font "arial, 10"
set ylabel "Accelera" font "arial, 10"
set zlabel "Air" offset 4 font "arial, 10"
set xrange [6.6 : 50]
set yrange [45 : 90]
set zrange [1.3 : 35.6]
set dgrid3d 30, 30, 40
set view 40, 30, 1, 1
set grid x y z
set border
unset key
set pm3d
splot "data.txt" using 2:3:4 with lines, "data.txt" using 2:3:4:1 with labels
set output "graph.png"
set term png size 1024, 768
replot
set terminal win
reset
Over data:
# (X, Y, Z)
+ 6.6 59 1.3
+ 6.6 59 1.3
+ 6.6 59 1.3
+ 7.3 65 4.2
+ 7.3 65 3.7
+ 7.3 65 4.4
+ 50 45 35.6
+ 50 45 32.4
+ 50 45 31
+ 10 90 15.5
+ 10 90 15.8
+ 10 90 16.8
# where X is Accelera,
# Y is Accelera and
# Z is Air.
GnuPlot gives an error message:
"instructions.txt", line 15: error in edge3d_intersect
I would like to catch this message in batch so as to tell the user that GnuPlot
has encountered an error. Is this possible?
Thanks
Martin O'Shea.
|