Alexey
Posts:
266
Registered:
6/14/08


Re: Export graphics without notebook ( using .m file)
Posted:
Dec 21, 2012 5:38 AM


Hi Olaf,
It does not work without the FrontEnd because the latter is necessary for rendering Mathematica's graphics. But it is still possible to run the FrontEnd from the script. Look at such functions as UsingFrontEnd, FrontEndExecute, $FrontEnd etc...
HTH, Alexey
<bar@ANTYSPAM.ap.krakow.pl> wrote: news:kajode$ilu$1@smc.vnet.net... > Hello, > It is example from help: >  > div[{vx_, vy_}] := D[vx, x] + D[vy, y]; > vf = {Cos[x + y^3], Sin[y + x^3]}; > fig = StreamDensityPlot[Evaluate[{vf, div[vf]}], {x, 3, 3}, > {y, 3, 3}, StreamPoints > Fine, StreamScale > Large, > ColorFunction > "Rainbow", MaxRecursion > 2, > LightingAngle > Automatic, StreamStyle > Black]; > Export["tt.jpg", fig]; >  > > The question is: > > Why this works fine inside Mathematica notebook > and doesnt work as a script ? > > math < example.m > > generates tt.jpg file but not identical as from notebook ? > > Version: Mathematica 7.0 > > > Olaf, > > > >

