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 would like to plot two 2d functions in a 3d coordinate system. Examples are z = x^2 and z = y^2. Each function has one independent variable, (either x or y), and a global dependent variable (z).

share|improve this question
1  
You've seen Plot3D[] already? –  J. M. Apr 20 '13 at 18:48
    
yes, of course, but i would like to show two independent 2d functions, eg. z=x^2 and z=y^2 in a xyz coordinate system. –  pauleck Apr 20 '13 at 18:56
    
Then what's wrong with Plot3D[x^2+y^2,{x,-1,1},{y,-1,1}] ? –  Jens Apr 20 '13 at 18:58
    
Well, Plot3D[{x^2, y^2}, {x, -2, 2}, {y, -2, 2}] works for me... –  J. M. Apr 20 '13 at 19:02
    
The Plot3D Argument merge these functions into one surface object, i would like to show them independent in, zy and zx layer. –  pauleck Apr 20 '13 at 19:03

1 Answer 1

For the two curves use the command:

g1 = ParametricPlot3D[{{t, 0, t^2}, {0, u, u^2}}, {t, -10,10}, {u, -10, 10},
     BoundaryStyle -> Thick];

in addition, if you want also to have the two $x-y$ and $y-z$ planes in the plot:

planes = ContourPlot3D[{x == 0, y == 0}, {x, -10, 10}, {y, -10, 10}, {z,0, 100}, 
         Mesh -> False, ContourStyle -> {Directive[Blue, Opacity[0.4]], 
         Directive[Green, Opacity[0.4]]}];

Show[g1,planes,PlotRange->{All,All,{-10,10}}]

enter image description here

share|improve this answer
    
many, many thanks. that's what i am looking for! –  pauleck Apr 20 '13 at 20:29
    
@pauleck, if this answers your question you should click on the check mark and the up-arrow next to the answer (to up-vote it - as I just did...) If you still want to wait for other answers, it's OK to leave the check mark unchecked until a day or so later. –  Jens Apr 20 '13 at 21:03
    
@Jens, OP has rep $1$; unless he is given rep (say, by upvoting his question), he won't be able to upvote Spawn's answer. He can certainly accept Spawn's answer, if it suits his needs. –  J. M. Apr 21 '13 at 0:26

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.