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
One of the most straightforward and less error prone way of switching
the x- and y-axis must be by using ParametricPlot as illustrated below.
f[x_] = x^2 Sin[x];
Plot[f[x], {x, -Pi, 2 Pi}]
ParametricPlot[{f[x], x}, {x, -Pi, 2 Pi}]
Regards,
--Jean-Marc
Use ParametricPlot instead of Plot. Like this:
ParametricPlot[{Sin[x], x}, {x, 0, 2 \[Pi]}]
David Park
djm...@comcast.net
http://home.comcast.net/~djmpark/
From: John.F...@csiro.au [mailto:John.F...@csiro.au]
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
Show[Plot[{Cos[x], Sin[x], Sin[x]/x}, {x, 0, 8 Pi}] /.
Line[pnts_] :> Line[Reverse /@ pnts], PlotRange -> All]
Regards
Jens
f[x_] := Sin[2 x];
ParametricPlot[{f[x], x}, {x, 0, 2}]
try also this one:
ListLinePlot[Table[{Sin[2 x], x}, {x, 0, 2, 0.01}]]
Have success, Alexei
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
--
Alexei Boulbitch, Dr., Habil.
Senior Scientist
IEE S.A.
ZAE Weiergewan
11, rue Edmond Reuter
L-5326 Contern
Luxembourg
Phone: +352 2454 2566
Fax: +352 2454 3566
Website: www.iee.lu
This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information. If you are not the intended recipient and have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal from your system. Thank you for your co-operation.
ParametricPlot[{Tan[x], x}, {x, 0, 2 Pi},
AspectRatio -> 1/GoldenRatio,
Exclusions -> {Pi/2, 3 Pi/2}]
Bob Hanlon
---- John.F...@csiro.au wrote:
=============