-1
$\begingroup$

I have two functions f1(x) and f2(x). I want to plot them such that f1 is on the axis of ordinates and f2 on the axis of abscissae. Any ideas?

Following example to it:

f1(x)=2x and f2(x)=3x. The graph should then show a line through the following points: {(0,0),(2,3),(4,6),(6,9),...}

$\endgroup$
3
  • 1
    $\begingroup$ Are you looking for a way to combine a plot with one that is rotated 90 degrees? Your question and title do not make it clear. $\endgroup$ Commented Jul 3, 2012 at 23:10
  • $\begingroup$ Dear editor, if you are the OP of this question, please consider registering your account; it'd be more convenient for you and for the rest of us. $\endgroup$ Commented Jul 4, 2012 at 9:46
  • $\begingroup$ Thanks for the comment. Since the question was moved, I though I could not access it. $\endgroup$
    – Andreas
    Commented Jul 4, 2012 at 10:11

2 Answers 2

7
$\begingroup$
ParametricPlot[{f2[x],f1[x]},{x, begin,end}]

where you have to fill in sensable values for begin and end.

Example:

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

Mathematica graphics

$\endgroup$
2
$\begingroup$

Perhaps you want this?

f1 = Sin;
f2 = Cos;

ParametricPlot[{{f1[x], x}, {x, f2[x]}}, {x, -2 π, 2 π}]

Mathematica graphics

Different rages for f1 and f2:

ParametricPlot[
  {{f1[u], u}, {v, f2[v]}},
  {u, 0, 3 π}, {v, -2 π, 2 π},
  Mesh -> False
]

Mathematica graphics


Related: plotting on the y-axis in Mathematica

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.