Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: Mathematica exports curves in pieces to Illustrator

  • To: mathgroup at smc.vnet.net
  • Subject: [mg45476] Re: Mathematica exports curves in pieces to Illustrator
  • From: "Steve Luttrell" <steve1 at _removemefirst_luttrell.org.uk>
  • Date: Fri, 9 Jan 2004 05:20:45 -0500 (EST)
  • References: <btb8ml$jno$1@smc.vnet.net> <btg92u$8vs$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"AES/newspost" <siegman at stanford.edu> wrote in message
news:btg92u$8vs$1 at smc.vnet.net...
> In article <btb8ml$jno$1 at smc.vnet.net>,
>  "David Park" <djmp at earthlink.net> wrote:
>
> > I have often wondered about programs that would take Mathematica plot
output
> > and allow improvements to be made on the plots. What programs are
available,
> > what will they do for you and roughly how much do they cost? How well do
> > they work with 3D graphics? Are they worth it?
> >
> > One of the things I don't like about Mathematica 3D graphics is the poor
> > rendering. There are often extra lines and spots that shouldn't appear
in
> > the graphics. Do programs like Illustrator solve these problems? When I
look
> > at some of the sample 3D plots on the WRI web site, they look as if they
had
> > been run through an auxiliary program.
>
> One limiting case is becoming enough of a Mathematica graphics guru to
> create your final, polished, presentation-level graphics output, getting
> everything exactly as you want it, totally in Mathematica.  I find this
> a very difficult, time-consuming, essentially unobtainable goal, even
> with a lot of trying.
>
> The alternative is to do as much as you can readily do in Mathematica
> without too much effort, including some easy things like putting in text
> some labels, converting all text to the fonts you want and various other
> tricks; then export the result as EPS and do final polishing in
> Illustrator.  The start-up costs in this approach include acquiring,
> paying for, and learning how to use Illustrator; and it also means you
> end up maintaining multiple files, i.e. the Mathematic nb that creates
> each graphic, maybe the EPS export, and the touched-up EPS export.
>
> Once you're past the initial hurdles, however, my view is that this is
> absolutely the way to go.  Important secondary benefits include the
> abilities you acquire to export the touched-up Illustrator images into
> any other formats you want, and in general the solid connection you now
> have to the entire Adobe/PDF/Illustrator/Photoshop worlds (with the
> low-end version, Photoshop Elements, being the
>

I have spent a lot of time trying to find a way of adding decent looking
annotation to plots in Mathematica. The key trick that I have found is a way
of using the Text graphics primitive to add any nicely formatted text that
you can ordinarily create in a text cell.

For example set the default textstyle for graphics text (this is important
otherwise things don't display nicely)

$TextStyle = {FontFamily -> "Times", FontSize -> 16};

and then use the following template to create a text graphic

Show[Graphics[Text[DisplayForm[...],{0,0}]]]

Now the problem is to construct a suitable expression to insert in place of
the ... above.

You can generate an appropriate expression to use for ... by using the text
editing capabilities of Mathematica to create a Text cell that looks exactly
like what you want to display in the text graphic above, and then copy from
the Text cell the expression you need to make the text graphic work
properly.

For instance if you could a bold x with a 0 subscript in an embedded cell in
a Text cell. If you then Show Expression on this cell you get

Cell[TextData[Cell[BoxData[
    FormBox[
      SubscriptBox[
        StyleBox["x",
          FontWeight->"Bold"],
        StyleBox["0",
          FontWeight->"Plain"]],
      TraditionalForm]]]], "Text"]

Now if you copy the part from the FormBox[... to the ...TraditionalForm]
which is

FormBox[
      SubscriptBox[
        StyleBox["x",
          FontWeight->"Bold"],
        StyleBox["0",
          FontWeight->"Plain"]],
      TraditionalForm]

and paste it in place of ... in Show[Graphics[Text[DisplayForm[...],{0,0}]]]
at the top of this message. You then have an expression that displays as a
text graphic exactly what you created in the Text cell above. It looks like
this when it has been spliced together

Show[Graphics[Text[DisplayForm[
FormBox[
      SubscriptBox[
        StyleBox["x",
          FontWeight->"Bold"],
        StyleBox["0",
          FontWeight->"Plain"]],
      TraditionalForm]
],{0,0}]]]

The above input cell creates the required text graphic. This approach
generalises to arbitrarily complicated expresions that you can construct in
a Text cell.

This trick is EXTREMELY USEFUL. I find that I can create very nice looking
annotated graphics without ever needing to go outside Mathematica. Even
better, I can generate all of my graphics under software control, so it is
very quick and easy to make changes.

Now why isn't this trick described in the Mathematica book?

--
Steve Luttrell
West Malvern, UK







  • Prev by Date: RE: Re: what's wrong about my package?
  • Next by Date: how to delete duplicate items in the same list
  • Previous by thread: Re: Mathematica exports curves in pieces to Illustrator
  • Next by thread: why Pi is not recognized as a positive number?