[Date Index]
[Thread Index]
[Author Index]
Re: Importing from Adobe Illustrator
*To*: mathgroup at smc.vnet.net
*Subject*: [mg61619] Re: [mg61615] Importing from Adobe Illustrator
*From*: "David Park" <djmp at earthlink.net>
*Date*: Mon, 24 Oct 2005 01:43:59 -0400 (EDT)
*Sender*: owner-wri-mathgroup at wolfram.com
Ben,
It certainly is easier to work entirely within Mathematica if you can. In
this case I think you can.
The idea is to use the Rectangle graphic primitive with a third argument.
The third argument is your basic plot. You put the Rectangle on a larger
piece of paper and then use the Arrow and Text routines to add the callouts
and to add other text you may want. Here is a somewhat crude example.
Needs["Graphics`Colors`"]
Needs["Graphics`Arrow`"]
Show[Graphics[
{Rectangle[{0, 0}, {1, 1}, Plot[Sin[x], {x, 0, 2Pi},
DisplayFunction -> Identity,
AspectRatio -> 1,
Axes -> {True, False},
Ticks -> None]],
Arrow[ {0.5, 1.20}, {0.28, 1.0}, HeadLength -> 0.03,
HeadCenter -> 0.5],
Text["peak", {0.5, 1.22}, {-1.3, 0}],
Arrow[ {0.8, -0.15}, {0.75, -0.0}, HeadLength -> 0.03,
HeadCenter -> 0.5],
Text["trough", {0.8, -0.17}, {-1, 0}],
Arrow[ {0.6, 0.75}, {0.5, 0.5}, HeadLength -> 0.03,
HeadCenter -> 0.5],
Text["null point", {0.6, 0.78}, {-1.2, 0}],
Text[StyleForm["Wave Terms", FontSize -> 20], {0.5, 1.4}]}],
AspectRatio -> Automatic,
PlotRange -> {{-0.1, 1.1}, {-0.25, 1.5}},
Frame -> False,
Background -> Linen,
ImageSize -> 500];
If you click on the plot you will see the Rectangle on the larger plot. You
can draw arrows from outside the Rectangle to inside the Rectangle. You will
usually want to control the AspectRatio of the inner plot with respect to
the Rectangle. If you have axes, a frame and tick labeling this can change
the relative location of the items in the inner plot to the overall plot. So
you will usually want to get that settled before you start drawing callout
arrows.
You can click off coordinates from the plot, but if you are within the
Rectangle the coordinates are different than if you are outside the
Rectangle. Therefore I added a Frame to the overall plot to estimate
coordinates and turned it off when I was finished. You can use 'outside'
coordinates to draw arrows to 'inside' locations.
David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/
From: Ben Kovitz [mailto:bkovitz at acm.org]
To: mathgroup at smc.vnet.net
BTW, what I *really* want to do is take some Mathematica output, draw
little "callout" arrows and remarks around it, and put the result back
into a Mathematica notebook. Is there some much superior way to do
this, that bypasses exporting and importing?
Ben Kovitz
Humboldt State University
Prev by Date:
**Re: Use of CAS in introductory science&engineering courses**
Next by Date:
**Re: Re: significance arithmetic and numeric equation solving**
Previous by thread:
**Re: Importing from Adobe Illustrator**
Next by thread:
**Entry Point Not Found in DLL**
| |