MathGroup Archive 2013

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

Search the Archive

Re: Plot with axes exchanged

For a function f, instead of the points {x, f[x]}, you want the points {f[x], x}. So use ParametricPlot. For example:

  f[x_] := x^2
  ParametricPlot[{f[x], x]}, {x, 0, 2}]

On Apr 16, 2013, at 12:34 AM, Dr. Wolfgang Hintze <weh at> wrote:

> How can I exchange axes in a plot, i.e. plot the function value along
> the horizontal axis and the independent variable against the vertical
> axis?
> Any help is apreciated.
> Wolfgang

Murray Eisenberg                                    murray at
Mathematics & Statistics Dept.      
Lederle Graduate Research Tower            phone 413 549-1020 (H)
University of Massachusetts                               413 545-2838 (W)
710 North Pleasant Street                         fax   413 545-1801
Amherst, MA 01003-9305

  • Prev by Date: Principal Values and NIntegrate
  • Next by Date: programmatically save as PDF (SaveRename problem)
  • Previous by thread: Re: Plot with axes exchanged
  • Next by thread: Re: Plot with axes exchanged