Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss
Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

[mg17315] help - how to invert the x or y axis..

336 views
Skip to first unread message

BobH...@aol.com

unread,
May 3, 1999, 3:00:00 AM5/3/99
to

In a message dated 5/1/99 4:44:25 AM, j...@chara.gsu.edu writes:

>Does anyone know how to invert the x or y axis?
>I want the y-axis to increase downward, instead of upward.
>According to the "MathSource" said that we can use "MongoArray" package
>to adjust the direstion of each axis.
>HOWEVER, this package can only handel multiple graphics. Forthermore,
>the output size is very small. (I think it is designed for "shared" axes,
>not for single plot.)
>THEREFORE, does Mathematica can plot a graphic with inverted axis?
>

Sean,

Plot[x^2,{x,1,5}];

To reverse the axis, plot the negative of the function and label the axis
with its negative.

Plot[-x^2,{x,1,5},
Ticks->{Automatic,Join[Table[{-k, ""}, {k, 25}],
Table[{-k, k}, {k, 5, 25, 5}]]}];


Bob Hanlon


David Park

unread,
May 3, 1999, 3:00:00 AM5/3/99
to
>Hi there:

>Does anyone know how to invert the x or y axis?


Here is a simple solution for your specific problem.

Plot[-x^2,{x,1,5},Ticks->{Automatic,Table[{i,-i},{i,-25,0,5}]}];

David Park
dj...@earthlink.net
http://home.earthlink.net/~djmp/

0 new messages