Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*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 2000

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

Search the Archive

RE: Reverse Axes in Plot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg23687] RE: [mg23659] Reverse Axes in Plot
  • From: "David Park" <djmp at earthlink.net>
  • Date: Mon, 29 May 2000 12:24:16 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

> From: David M.F. Chapman [mailto:chapmand at accesscable.net]
To: mathgroup at smc.vnet.net
>
> Hi...I am using Mathematica 4 with the MacOS.
>
> I would like to plot a simple 2D plot with the y-axis increasing
> DOWNwards instead of UPwards.  Does anyone know how to do this?  I have
> looked high and low for the answer!
>
> cheers, Dave
>

Dave,

Basically, you use the Ticks or FrameTicks option in your Plot or Show
statement. You can use the Table command to generate the Tick options. It is
a little bit of work.

This seems to be a frequent question to MathGroup, so I have finally added a
CustomTicks command to my DrawingPaper routines, available at my web site.
With the CustomTicks command you specify how the displayed ticks are related
to the original values. For example to increase in the negative direction
you would use the pure function -#&. Then you specify the starting value,
ending value and increment along with the number of subdivisions for the
ticks. There are also separate options for specifying the number formatting,
the tick specifications and the tick style. Of course, when you modify your
ticks you have to make certain you are plotting the correct function to go
with them. The expression x^2/10 is plotted in the negative direction by the
following DrawingPaper statement.

Needs["Graphics`DrawingPaper`"]
Needs["Graphics`DrawingTicksAndGrids`"]

Show[Graphics[{Blue, Draw[-x^2/10, {x, 0, 10}]}],
  PlotRange -> {{-0.01, 10}, {-10.01, 0.01}}, Background -> Linen,
   {Frame -> True,
    FrameTicks -> {Automatic, CustomTicks[-#1 & , {0, 10, 2.5, 5}],
      Automatic, Automatic}}];

You can also use CustomTicks in a regular Plot statement. In this case, only
the DrawingTicksAndGrids package is needed.

Plot[-x^2/10, {x, 0, 10},
    Ticks -> {Automatic, CustomTicks[-#1 &, {0, 10, 2.5, 5}]}];

The package also has routines for drawing free standing scale lines in the x
or y directions.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/



  • Prev by Date: Re: checking for a dead MathLink connection
  • Next by Date: Re: FindMinimum of a compiled function??
  • Previous by thread: Reverse Axes in Plot
  • Next by thread: Re: Reverse Axes in Plot