Re: Exporting plots with the kernel

*To*: mathgroup at smc.vnet.net*Subject*: [mg65333] Re: Exporting plots with the kernel*From*: Peter Pein <petsie at dordos.net>*Date*: Mon, 27 Mar 2006 06:55:58 -0500 (EST)*References*: <dvbikn$i61$1@smc.vnet.net> <e05rno$3t0$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

kalymereau at yahoo.fr schrieb: > Actually I have just discovered that, independently of font problems, > when running Mathematica in a command-line way (i.e. just the kernel) > it is not possible to export a plot to a file in any graphical format > if there is no X-server running ! Only the FrontEnd seems to know how > to export a plot. > > This is really a strange behavior ! Even with Postscript it doesn't > work. For example > Display["plot.eps",myPlot,"EPS"] produces an error if there is no > X-server (the same with Export). I can use Display["plot.eps",myPlot] > to produce a file that seems to be in Mathematica specific Postscript > language, but then this file cannot be read with standard Postscript > viewers. Is there a way to translate this file to a more standard > format ? > > I know that I can produce the numerical data with the kernel, and then > read it and plot it with the FrontEnd. But I am talking about the > result of quite long calculations, and I would like to check the output > quickly with a plot without having to launch the FrontEnd. Also I am > often out of office, and I have to run batch jobs on my office > machines: in such a situation I want the plots without being obliged to > have access to a local Mathematica FrontEnd. > > Thanks for any suggestion that would help me to bypass this severe > limitation of the kernel. > Salut, with Mathematica 5.1 for Windows, Plot[Sin[x],{x,-Pi,Pi}] Export["test.png",%,"PNG"] works as expected. I'll try it with Mathematica 5.2 for Linux and will send a message iff this fails. Peter