Mathematica API Notes

From myWiki
Revision as of 10:02, 8 April 2019 by Stevet (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Save the following as input.m

SetOptions[Plot,DisplayFunction->Identity]
a=Plot[Cos[2*x],{x,0,Pi}]
Export["plot.png",a]
Exit[]

The following can be run from the command line in /opt/Wolfram/WolframEngine/10.0/Executables

./math -run "<<input.m"