How to make the color of contour line to follow the colormap of the 3d surface?
I would like to have the z value as well written on the plot and change the contour line with other symbol like * or + if possible.
somehow my code here does not work.
fig = plt.figure()
ax = plt.axes(projection='3d')
# Normalize to [0,1]
norm = plt.Normalize(z.min(), z.max())
colors = cm.coolwarm(norm(z))
surf = ax.plot_surface(x,y,z, facecolors=colors)
surf.set_facecolor((0,0,0,0))
mapc1 = ax.contour(x,y,z, zdir='z', levels=[3.5e-12, 4e-12], offset=z.min(), cmap=cm.coolwarm)
mapc2 = ax.contour(x,y,z, zdir='z', levels=[3.5e-12, 4e-12], cmap=cm.coolwarm, linestyles=('-',))
#ax.clabel(mapc2, fmt = '%1.1f', colors = 'k', fontsize=14, inline=True) #contour line labels
ax.clabel(mapc1, inline=True, fontsize=10)
