You will have to use the plot_surface
command from your ax
object. I will present a code snippet from my own plotting library, you will just have to refactor it as needed. However, this (or highly similar) questions have been asked before (e.g. surface plots in matplotlib).
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
def surface_plot(X,Y,Z,**kwargs):
""" WRITE DOCUMENTATION
"""
xlabel, ylabel, zlabel, title = kwargs.get('xlabel',""), kwargs.get('ylabel',""), kwargs.get('zlabel',""), kwargs.get('title',"")
fig = plt.figure()
fig.patch.set_facecolor('white')
ax = fig.add_subplot(111, projection='3d')
ax.plot_surface(X,Y,Z)
ax.set_xlabel(xlabel)
ax.set_ylabel(ylabel)
ax.set_zlabel(zlabel)
ax.set_title(title)
plt.show()
plt.close()
PS: There has been a recent string of down votes on this answer. Therefore I will add that the original question was badly formulated and that this answer is exactly what the OP wanted based on a private conversation with the OP.