I would like to plot the solution of an equation in three variables via a color map, thus combining the functions of ContourPlot3D and DensityPlot.

That is, I have a plot of the form


but I think it would look much better as a plot in (x,y) space where each point is assigned a color corresponding to a z value. Is there a way this can be done?

  • $\begingroup$ Have you seen SliceContourPlot3D[] and SliceDensityPlot3D[]? $\endgroup$ Commented Jan 30, 2017 at 7:46
  • $\begingroup$ I don't think this is what I want....looks like this plots a function of three variables on a surface, whereas I'm simply looking to transform a surface into a 2D density plot. $\endgroup$ Commented Jan 30, 2017 at 7:53
  • $\begingroup$ Okay, so in the case of there being two or more $z$ values corresponding to an $x,y$ pair, what do you want to do? $\endgroup$ Commented Jan 30, 2017 at 7:55
  • $\begingroup$ That's a good question. Let's say that I've constrained the bounds on x, y, and z such that there's only one solution for any x and y, so that this won't be a problem $\endgroup$ Commented Jan 30, 2017 at 7:59
  • $\begingroup$ Do you have a sample F[x, y, z] and an appropriate domain in mind, so that we can try something out with actual examples? $\endgroup$
    – MarcoB
    Commented Jan 30, 2017 at 19:31


Your Answer

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

Browse other questions tagged or ask your own question.