MathGroup Archive 2009

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

Search the Archive

Re: switching axes in Plot?

  • To: mathgroup at
  • Subject: [mg96340] Re: switching axes in Plot?
  • From: dh <dh at>
  • Date: Thu, 12 Feb 2009 06:33:23 -0500 (EST)
  • References: <gmu8qa$glt$>

Hi John,

the cheapest solution is simply to rotate the picture:

Rotate[Plot[Sin[x], {x, 0, 10}], Pi/2]

However, that is probably not good enough as the labels face the wrong 

way. A better way is to use ParametricPlot:

ParametricPlot[{Sin[x], x}, {x, 0, 10}]

hope this helps, Daniel

John.Finnigan at wrote:

> When using Plot to plot F[x] as a function of x, Mathematica automatically =

> assigns the independent variable x to the horizontal axis and the dependent=

>  variable F[x] to the horizontal.  I often want to switch this around so th=

> at the independent variable runs on the vertical axis and the dependent on =

> the horizontal.  I feel sure there ought to be a simple way to tell Plot to=

>  make this change but I have never found it and instead have resorted to co=

> nvoluted approaches.  Can anyone tell me what the simple trick is, if it ex=

> ists?

> Thanks

> John Finnigan



  • Prev by Date: internal details of Options, Default, Attributes
  • Next by Date: Re: Help! About drawing a high-precision 3D graph
  • Previous by thread: Re: switching axes in Plot?
  • Next by thread: Re: switching axes in Plot?