• To: mathgroup at smc.vnet.net
• Subject: [mg65598] Re: Axes with arrowheads !?
• From: Peter Breitfeld <phbrf at t-online.de>
• Date: Mon, 10 Apr 2006 02:31:18 -0400 (EDT)
• References: <e1ah86\$1q0\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```luis.riegger at gmail.com schrieb:
> how can i do that !?!
>

I don't know, if this is good code, but it works:

Needs["Graphics`Arrow"]

Options[PfeileAnAchsen]=Options[Arrow];

PfeileAnAchsen::whoops=
"First argument of \"PfeileAnAchsen\" must have Head Graphics."

PfeileAnAchsen[pl_,(frac:(_?NumberQ):1/15),opts___?OptionQ]/;
Module[{x0,y0,xi,xf,yi,yf,xdelta,ydelta,xfarrow,yfarrow,prim,gopts,hcopt},
{{xi,xf},{yi,yf}}=PlotRange/.AbsoluteOptions[pl,PlotRange];
{x0,y0}=AxesOrigin/.AbsoluteOptions[pl,AxesOrigin];
xdelta=(xf-xi)frac;
ydelta=(yf-yi)frac;;
Show[
Graphics[{xfarrow,yfarrow},
PlotRange->{{xi,xf+xdelta},{yi,yf+ydelta}}],
FullGraphics[pl /.Graphics[prim:{___},gopts_]:>
Graphics[prim,Axes->True,gopts]],
DisplayFunction->\$DisplayFunction]
];

Now you may call it like this:

gr=Plot[Sin[x],{x,-Pi,2Pi}];
PfeileAnAchsen[gr]

or even

PfeileAnAchsen[Plot[Sin[x],{x,-Pi,2Pi},DisplayFunction->Identity]]

Gruss Peter
--
==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de

```

• Prev by Date: Re: HoldFirst question
• Next by Date: Re: Help with Identities