MathGroup Archive 2008

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

Search the Archive

Re: more inset export problems

  • To: mathgroup at smc.vnet.net
  • Subject: [mg90228] Re: more inset export problems
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 2 Jul 2008 06:37:47 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <g4fi1i$9un$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

ins2 = Graphics[
    Inset[Framed@Grid[{{"A", "B"}, {"C", "D"}, {"E", "F"}}],
     Scaled[{0.3, 0.4}]]];
graph2 = Plot[Sin[x], {x, -1, 5}, Frame -> True, Axes -> False];
gg = Show[graph2, ins2];

Export["c:/temp/test.eps", gg]

work fine on Windows with GhostScript and Adobe Illustrator ..

Regards
   Jens

M.Roellig wrote:
> Hi group,
> 
> I am trying to produce publishable EPS versions of some of my plots. I
> am using Inset to produce customized legends and am running into
> problems once I am trying to export the plot to EPS (or PDF,...).
> Taking the follwoing example:
> 
> ins2 = Graphics[
>    Inset[Framed@Grid[{{"A", "B"}, {"C", "D"}, {"E", "F"}}],
>     Scaled[{0.3, 0.4}]]];
> graph2 = Plot[Sin[x], {x, -1, 5}, Frame -> True, Axes -> False];
> Show[graph2, ins2]
> 
> 
> So far everything looks fine, but after EPS export (either via Export
> selection as..., or via the Export command) the text in the legends is
> getting messed up. Looking at the test.eps will demonstrate what I
> mean:
> 
> Export["test.eps", Show[graph2, ins2], "EPS"]
> 
> In a message thread from Dec 2007 a workaround for this problem has
> been presented:
> (
> http://groups.google.de/group/comp.soft-sys.math.mathematica/browse_thread/thread/8a6b372b039303ce/7a51d7a4da261401?lnk=gst&q=inset+problems#7a51d7a4da261401
> )
> 
> (*record the old value of the PrintingStyleEnvironment option*)
> oldopts = Options[$FrontEnd, PrintingStyleEnvironment];
> (*set the value to "Working"*)
> SetOptions[$FrontEnd, PrintingStyleEnvironment -> "Working"];
> (*your export code here*)
> Export["test.eps", Show[graph2, ins2], "EPS"]
> (*reset the option to the original value*)
> SetOptions[$FrontEnd, oldopts];
> 
> This works, however, if I slightly increase complexity of the legend
> text EPS export again fails. Take for example:
> 
> ins3 = Graphics[
>    Inset[Framed@
>      Grid[{{"\!\(\*FractionBox[\"A\", \"a\"]\)",
>         "\!\(\*FractionBox[\"B\", \"b\"]\)"}, {"C",
>         "D"}, {"\!\(\*FractionBox[
> RowBox[{\"E\", \" \",
> RowBox[{\"(\",
> RowBox[{\"1\", \"-\", \"0\"}], \")\"}]}],
> RowBox[{\"e\", \" \", \"[\",
> RowBox[{\"2\", \"-\", \"1\"}], \"]\"}]]\)", "F"}}],
>     Scaled[{0.5, 0.4}]]];
> 
> (I hope the cut&paste is working)
> 
> Now exporting it and examining the EPS shows Mathematica's problems in
> EPS-Export (even if I adapt the PrintingStyleEnvironment like above:
> 
> Export["test.eps", Show[graph2, ins2, ins3], "EPS"]
> 
> Does anybody can give me an idea how to EPS export my legends
> properly?
> 
> Thanks in advance
> 
> Markus
> 
> 


  • Prev by Date: Re: Printing, WYSIWYG, and Window Magnification?
  • Next by Date: RE: Re: Possible Bug in Mathematica 6
  • Previous by thread: Re: Draw two functions in a graph, one of them does also
  • Next by thread: more inset export problems