MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Exporting plots within Win applications / Metafile under Unix/Linux?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg12692] Re: Exporting plots within Win applications / Metafile under Unix/Linux?
  • From: paulh (P.J. Hinton)
  • Date: Wed, 3 Jun 1998 02:20:45 -0400
  • Organization: Wolfram Research, Inc.
  • References: <6kvrdu$7t9@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <6kvrdu$7t9 at smc.vnet.net>, SESSELMANN  ROLAND
<sesselma at engine.Colorado.EDU> writes:
 
|> Question 2:
|> 
|> Can one save a plot as a Microsoft Windows Metafile in Mathematica
3.0 |> under Unix/Linux?

Unfortunately, no.  The Windows Metafile format is proprietary, so only
Microsoft has complete knowledge on how these files are created.  
Their generation on the Windows version of Mathematica is handled by 
Windows API calls.  Providing this kind of functionality under Linux
would be a nontrivial task because it would require reverse engineering
this portion of the Windows API.

One workaround you may want to consider using Save[] under Linux to save
the Graphics object definiitions and then transfer these text files to 
Windows, wherein they can be read into the kernel with the Get[]
command. Once the Windows kernel gets the graphics object, you can use
Display[] to create the Metafile for import into your PowerPoint
presentation.

(* Linux *)

In[1]:= gr1 = Plot[Sin[x], {x,0,2Pi}];

In[2]:= Save["graph1.m", gr1];

(* Now transfer the .m file from Linux to Windows using FTP or disk. *)

(* Windows NT *)

In[1]:= Get["graph1.m"];

In[2]:= Display["graph1.wmf", gr1, "Metafile"]

Note here that you're exporting only the Mathematica graphics 
primitives between Linux and Windows NT.  All the of the computational
dirty work is done on Linux.  The Windows machine just rerenders the
graphic from the primitives.

--
P.J. Hinton	
Mathematica Programming Group		paulh at wolfram.com Wolfram Research,
Inc.			http://www.wolfram.com/~paulh/ Disclaimer: Opinions expressed
herein are those of the author alone.


  • Prev by Date: Absolute coordinates in Mathematica
  • Next by Date: Problem with Expand[Expr, Trig ->True]
  • Previous by thread: Exporting plots within Win applications / Metafile under Unix/Linux?
  • Next by thread: How to get PostScript file in text mode.