MathGroup Archive 2003

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

Search the Archive

Re: Switching x and y axes in a plot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg41557] Re: Switching x and y axes in a plot
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Mon, 26 May 2003 05:46:34 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <bakj5v$l89$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

a) exchange the x- and y-axes


gr = Plot[Sin[x], {x, 0, 2Pi}, DisplayFunction -> Identity];
Show[gr /. Line[a_] :> Line [Reverse /@ a], 
  DisplayFunction -> $DisplayFunction]

b) look what ListPlot[] can do for you.

Regards
  Jens

Gregory Lypny wrote:
> 
> Hello everyone,
> 
>         I'm new to Mathematica, so I hope you'll forgive my first couple of
> naive questions.
> 
>         I've used Plot to graph a parabola as follows: Plot[ax^2 - 2bx + c,
> {x, xMin, xMax}].  Is there any way to plot the function so that y
> appears on the horizontal axis and x on the vertical?  (I realize the
> parabola part is uninteresting; it's actually the solution to a
> standard problem in financial economics involving the minimization of
> investment portfolio risk for a given expected return.)
> 
>         Another plot-related question, if I may: do all plots require the
> specification of a domain as {x, xMin, xMax}?  For example, how would I
> create a scatter plot of experimental data where I have a long
> two-column list or matrix consisting of x and y observations where the
> data determine the domain and range?
> 
>         Sincerely,
> 
>                 Gregory
> 
>         Gregory Lypny
>         Associate Professor
>         Concordia University
>         ___________________
>         "Better for us if you don't understand."
>                 The Tragically Hip
> 
>         http://pareto.concordia.ca


  • Prev by Date: Re: Convert list into function
  • Next by Date: Re: TraditionalForm output and subscript variable
  • Previous by thread: RE: Switching x and y axes in a plot
  • Next by thread: how implement sets