MathGroup Archive 1999

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

Search the Archive

Re: How invert x-axis in a plot?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg17667] Re: How invert x-axis in a plot?
  • From: "Stephen P Luttrell" <luttrell at signal.dra.hmg.gb>
  • Date: Fri, 21 May 1999 23:58:52 -0400
  • Organization: Defence Evaluation and Research Agency
  • References: <7i35ck$bfl@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Helmuth Kristen <hkristen at cfa.harvard.edu> wrote in message
news:7i35ck$bfl at smc.vnet.net...
> Hi there,
>
> I wonder how to invert the x-axis in a Mathematica plot. Inverting the
> PlotRange of the axis from e.g.{-100,100} to {100,-100} does not help.

Here is an example of the type of thing you want to do:

f[x_]:=x^3;

Plot[f[-x],{x,-1,1},PlotRange->All,Ticks->{Table[{-x,x},{x,-1,1}],Automatic}
];

This plots the function x^3 for x in the range [-1,1], starting at the right
hand side of the page. The Ticks option allows you to annotate your axes any
way that you please. I have overridden the x ticks as appropriate in this
case, but I have left the y ticks set to Automatic.


--
Stephen P Luttrell
Signal Processing and Imagery Department
DERA Malvern, St.Andrew's Road
Malvern, United Kingdom, WR14 3PS

+44 (0)1684 894046 (tel)
+44 (0)1684 894384 (fax)
luttrell at signal.dera.gov.uk (email)




  • Prev by Date: Re: Repost: Solve: same or new bug?
  • Next by Date: Re:Simple Question: 2graphs in one?
  • Previous by thread: How invert x-axis in a plot?
  • Next by thread: Re: How invert x-axis in a plot?