I am trying to run a .m file with wolfram script. I use the command
wolframscript -file name.m
It works until the program arrives to a Plot
. I know that with wolfrascipt I cannot produce a graphic on screen as with the front-end, so I tried to suppress the output with a ;
, as follows:
plot=Plot[Sin[x],{x,-Pi,Pi}];
and later to Export
plot
, but it still does not run.
How do I produce and save a plot with wolframscript?
plot=Plot[Sin[x],{x,-Pi,Pi}]; Export["test.png", plot];
should produce a valid output image ... $\endgroup$