MathGroup Archive 2000

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

Search the Archive

Re: Problem with the Grapical Arrows

  • To: mathgroup at smc.vnet.net
  • Subject: [mg22635] Re: [mg22622] Problem with the Grapical Arrows
  • From: Hartmut Wolf <hwolf at debis.com>
  • Date: Thu, 16 Mar 2000 09:10:51 -0500 (EST)
  • Organization: debis Systemhaus
  • References: <200003150346.WAA01874@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

com3 at ix.netcom*NOSPAM*.com schrieb:
> 
> ..., I'm using ver 3.0 
>
> I've produced 4 separate plots and have combined them into a single
> plot using the Show command.
> 
> I then need to annotate this plot and do so with the Text and Epilog
> commands. . .  so far so good.
> 
> I would now like to add an arrow to this plot but can't get it to
> work. See my code below.
> 
> Needs["Graphics`Arrow`"]
> Needs["Graphics`FilledPlot`"]
> Show[plot1,plot3,plot2,plot4,
> PlotRange->{{20000,52000},{0,.00014}},
> FrameTicks->{None,None,None,None},
> FrameLabel->{"xlabel",
>       "ylabel" },
> Epilog->{Text["A",Scaled[{.315,.97}]],
> Text["B",Scaled[{.62,.73}]],
> Text["C",Scaled[{.46,.36}]],
> Text["D",Scaled[{.55,.9}]],
> Text["E",Scaled[{.8,.8}]],
> Text["F",Scaled[{.65,.26}]],
> Arrow[{.9,.9},{.1,.1}]         }]
> 
> A couple of the plots are "filled" that's why
> Needs["Graphics`FilledPlot`"] is shown.
> 
> The plots 1 thru 4 and all text get rendered properly but the arrow
> simply doesn't appear. I also receive no error message whatsoever.
> It's as if an invisible arrow is being rendered.
> 
> Also, the following code works fine on my machine, but doesn't use the
> Show command.
> Plot[Sin[x], {x, 0, 2Pi},
>     Epilog -> {Arrow[{4, .25}, {Pi/2, 1}],
>      Text["Here", {4, .15}, {0, -1}]}]
> 

Steve,

you didn't give us your plot<i>s, but if I look at your PlotRange, I'd
say that your arrow is far out. The coordinates for Arrow have to be
user coordinates not Scaled ones (and Arrows doesn't work with
Scaled[{x,y}] ... certainly something to improve). 

If you don't like the user coordintes you can make your own "scaled
coordinates" for your combined plot if you first generate it (with all
embellishments), 

cg = Show[plot1, plot2, ...]

then extract the effective PlotRange, and define

Clear[x,y]

sc[{x_, y_}] = 
First /@ pr - {x, y} Apply[Subtract, FullOptions[cg, PlotRange], 1]

Finally you may insert your Arrow scaled:

Show[plot1, ..., Epilog->{..., Arrow[sc[{.9,.9}],sc[{.1,.1}]]}]

(Of course for a different plot you'll have to set up sc anew.)


Hartmut


  • Prev by Date: Re: [Q] Differential equation?
  • Next by Date: Re: [Q] Differential equation?
  • Previous by thread: Re: Re: [Q] Differential equation?
  • Next by thread: Re: Problem with the Grapical Arrows