Re: Problems with creating EPS-Files
- To: mathgroup at smc.vnet.net
- Subject: [mg18092] Re: Problems with creating EPS-Files
- From: paulh at wolfram.com (P.J. Hinton)
- Date: Thu, 17 Jun 1999 12:26:33 -0400
- Organization: Wolfram Research, Inc.
- References: <7k4p8u$d1k@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In article <7k4p8u$d1k at smc.vnet.net>, luis8477 at my-deja.com writes: > I created some graphics with Mathematica (3.0). What I want to do then > is to export the graphics into eps-file for later use with LaTeX. > I found 2 ways to realize it: > > a) Simple click on the graphic. Right mouse button -> Save selection > as... -> EPS. This works fine, but I find the graphic in the eps-file > not where the bounding box is (or vice versa as you like it). What version of Mathematica 3.0 are you using? If you are using an early release of the notebook front end, there is a known problem with the calculation of the bounding box for front-end generated EPS files. To see if you are using such a version, paste the following expression into a notebook and click "Yes" when the front end asks you whether it should attempt to interpret it. Cell[TextData[ValueBox["$FullVersion"]], "Text"] if the first three numbers of the version are 3.0.0, then you are probably running into the problem described above. The fix is to replace a text resource file in your Mathematica installation with a different version from our website. http://support.wolfram.com/Graphics/Formats/EPS/FrontEndFix.html > b) Then I rtfm. And I learned about a command called "Display". > If I use it like this: > gr=Plot[Sin[x],{x,-2,2}] > Display["epsfile.eps",gr,"EPS"] > it works fine. But I have a more complex graphic with axeslabels an a > Plotlabel and also a PlotLegend (actually I'm using "MultipleListPlot"). > The moment I try to include text into my graphic the file is often > not saved to disk correctly. Example: > gr=Plot[Sin[x],{x,-\[Pi],\[Pi]},PlotLabel->"sin(x)", > AxesLabel->{\[Pi],\[Alpha](x)}] > Display["epsfile.eps",gr,"EPS"] > > What happens? If I start the windows explorer (I work with NT4) I find a > epsfile.eps with size 0 that can't be removed because it seems to be > used by another program (mathematica I guess). Ok. If I then quit the > kernel the eps-file grows to a certain size, can be removed and also > watched with gsView. The bounding box is ok, but the graphic is not > complete (i.e. it lacks the curve of the function and sometimes also > the text of my labels). > > Can anybody tell me why encounter this problems? Or how I can bring the > bounding box of the eps-file to the right place? EPS files generated with this method use a MathLink program named psrender Among other things, psrender translates the abbreviated Mathematica PostScript emitted by the kernel into EPS. You may be able to download an updated version of this executable from our Technical Support department. Contact them for more information. http://www.wolfram.com/services/techsupport/contact.html -- P.J. Hinton Mathematica Programming Group paulh at wolfram.com Wolfram Research, Inc. Disclaimer: Opinions expressed herein are those of the author alone.