Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Axes with arrowheads !?

  • To: mathgroup at
  • Subject: [mg65593] Re: Axes with arrowheads !?
  • From: bghiggins at
  • Date: Mon, 10 Apr 2006 02:31:13 -0400 (EDT)
  • References: <e1ah86$1q0$>
  • Sender: owner-wri-mathgroup at

Use the Arrow package with Plot. You need to load the package first

<< Graphics`Arrow`

The strategy is to first plot your function and then use FullOptions to
extract the PlotRange that Plot uses to draw the axes. One can use that
data to contruct arrows that are aligned along the axes. Here is an

Block[{$DisplayFunction = Identity}, plt = Plot[Cos[
      x], {x, -2, 4}, PlotRange -> {-1, 1.5}];
  xArrow = (PlotRange /. FullOptions[plt])[[1]] /. {xmin_, xmax_} ->
Arrow[{xmin, 0}, {xmax, 0}];
  yArrow = (PlotRange /. FullOptions[plt])[[ 2]] /. {ymin_, ymax_} ->
Arrow[{0, ymin}, {0, ymax}];]
Show[plt, Epilog -> {xArrow, yArrow}]

Hope this helps,



  • Prev by Date: Re: Help with Identities
  • Next by Date: For Loop problem
  • Previous by thread: Axes with arrowheads !?
  • Next by thread: Re: Axes with arrowheads !?