MathGroup Archive 2009

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

Search the Archive

Re: switching axes in Plot?

  • To: mathgroup at
  • Subject: [mg96356] Re: switching axes in Plot?
  • From: Jens-Peer Kuska <kuska at>
  • Date: Thu, 12 Feb 2009 06:36:18 -0500 (EST)
  • References: <gmu8qa$glt$>


Show[Plot[{Cos[x], Sin[x], Sin[x]/x}, {x, 0, 8 Pi}] /.
   Line[pnts_] :> Line[Reverse /@ pnts], PlotRange -> All]


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: Setting upvalues, using ^:=, such that they get actually used
  • Next by Date: Scalar plot in 3D
  • Previous by thread: switching axes in Plot?
  • Next by thread: Re: switching axes in Plot?