-2
$\begingroup$

I want to give different colors to functions in a 3D plot. For example, in the following statement, what must be included for doing so?

Plot3D[{(y^2/x), (x^2 + y^2)}, {x, -3, 3}, {y, -3, 3}]
$\endgroup$
  • 3
    $\begingroup$ Have you looked up PlotStyle? $\endgroup$ – Michael E2 Jul 5 at 3:50
1
$\begingroup$

As Michael E2 said in his comment, the PlotStyle can be used to specify colors for each surface. Like so:

Plot3D[{(y^2/x), (x^2 + y^2)}, {x, -3, 3}, {y, -3, 3}, PlotStyle -> {Red, Green}]

plot

| improve this answer | |
$\endgroup$

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