Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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),...}

share|improve this question

migrated from stackoverflow.com Jul 3 '12 at 22:31

This question came from our site for professional and enthusiast programmers.

1  
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. –  István Zachar Jul 3 '12 at 23:10
    
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. –  J. M. Jul 4 '12 at 9:46
    
Thanks for the comment. Since the question was moved, I though I could not access it. –  Andreas Jul 4 '12 at 10:11
add comment

2 Answers 2

up vote 6 down vote accepted
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

share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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