0

I have Z0 defined as the probability density function of a normal distribution.

I can plot the 2D contour

ax.contour(X,Y,Z0)

enter image description here

and I can plot it in 3D

surf = ax.plot_surface(X, Y, Z0, cmap=cm.coolwarm, linewidth=0, antialiased=False)

enter image description here

I tried adding both to the same axis, but the 2D is not showing (I guess because it is covered by the colour of the 3D graph).. How can I plot the 2D contour at z = -1, so that it is visible below the 3D figure, almost as a projection?

Thank you very much!

Lauren
  • 337
  • 1
  • 2
  • 4
  • If you have a problem understanding or implementing the [matplotlib example](https://matplotlib.org/examples/mplot3d/contour3d_demo3.html) you need to share the code and clearly explain what problem that is. – ImportanceOfBeingErnest Mar 17 '18 at 18:49
  • This question seems to be [en vogue](https://stackoverflow.com/questions/49342018/how-do-i-plot-3-contours-in-3d-in-matplotlib) at the moment. – ImportanceOfBeingErnest Mar 17 '18 at 22:15

0 Answers0