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

  • 1
    $\begingroup$ You've seen Plot3D[] already? $\endgroup$ – J. M.'s torpor Apr 20 '13 at 18:48
  • $\begingroup$ 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. $\endgroup$ – pauleck Apr 20 '13 at 18:56
  • $\begingroup$ Then what's wrong with Plot3D[x^2+y^2,{x,-1,1},{y,-1,1}] ? $\endgroup$ – Jens Apr 20 '13 at 18:58
  • $\begingroup$ Well, Plot3D[{x^2, y^2}, {x, -2, 2}, {y, -2, 2}] works for me... $\endgroup$ – J. M.'s torpor Apr 20 '13 at 19:02
  • $\begingroup$ The Plot3D Argument merge these functions into one surface object, i would like to show them independent in, zy and zx layer. $\endgroup$ – pauleck Apr 20 '13 at 19:03

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]]}];


enter image description here

  • $\begingroup$ many, many thanks. that's what i am looking for! $\endgroup$ – pauleck Apr 20 '13 at 20:29
  • $\begingroup$ @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. $\endgroup$ – Jens Apr 20 '13 at 21:03
  • $\begingroup$ @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. $\endgroup$ – J. M.'s torpor Apr 21 '13 at 0:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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