Re: swap x and y axis
- To: mathgroup at smc.vnet.net
- Subject: [mg35878] Re: [mg35872] swap x and y axis
- From: BobHanlon at aol.com
- Date: Mon, 5 Aug 2002 06:01:47 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 8/4/02 6:33:48 AM, mvane at eunet.yu writes:
>Is there any way to swap x and y axis in Plot command??
>
>I tried something like
>
>fja := Display[$Display, #,ImageRotated->True] &
>Plot[Sin[t], {t, 0, 3Pi/2}, DisplayFunction :> fja]
>
>but it doesn't work.
>
>Help!!
>
>Note: I prefer avoiding ListPlot, if possible...
Module[{plt = Plot[Sin[x], {x, 0, 2 Pi},
DisplayFunction -> Identity]},
Show[plt /.
{x_?NumericQ, y_?NumericQ} -> {y, x},
AspectRatio->
1/(AspectRatio /. AbsoluteOptions[plt]),
ImageSize -> 178,
DisplayFunction -> $DisplayFunction]];
Bob Hanlon
Chantilly, VA USA