| Author |
Comment/Response |
Mark Zajac
|
10/03/01 11:17am
Hi
When executed in "batch mode" from a UNIX shell script,
Mathematica fails to produce any graphics. The syntax
is like this:
math -batchinput -batchoutput < batch_file
where "batch_file" (see below) contains simple Mathema-
tica commands for reading some data from a file, plot-
ting the data and then exporting the resulting graph as
a "GIF" image.
The commands in "batch_file" produce the desired
results when executed from an interactive shell. The
sequence of commands looks like this:
UNIX_prompt > math
Mathematica 4.0 for Solaris
Copyright 1988-1999 Wolfram Research, Inc.
-- Motif graphics initialized --
In[1]:= << batch_file
which generates a "GIF" file. Notice that I'm using
Mathematica 4.0 under Solaris (version 2.8). Running
the same commands in batch mode gives an error. Like
this:
takagi > math -batchinput -batchoutput < batch_file
" Cannot initialize Motif graphics "
which is very disappointing. This procedure worked
with older versions of Mathematica. What has changed?
How do I make this work again?
Sincerely,
[:-)] Mark
Mark Zajac
----------- 8< --- batch_file ------ 8< ---------
data = ReadList[ "data" ];
graph = ListPlot[ data, DisplayFunction -> Identity ];
file = Display[ "graph.gif", graph, "GIF" ];
----------- 8< --- data ------------ 8< ---------
1
2
3
4
5
URL: , |
|