import matplotlib.pyplot as plt
from matplotlib import cm
import numpy as np
from mpl_toolkits.mplot3d.axes3d import get_test_data
from mpl_toolkits.mplot3d import Axes3D

fig = plt.figure( figsize =plt.figaspect( 0.5 ))


X = np.arange(- 5 , 5 , 0.1 )
Y = np.arange(- 5 , 5 , 0.1 )
X, Y = np.meshgrid(X, Y)
R = np.sqrt(X** 2 + Y** 2 )
Z = np.sin(R)

#1
ax = fig.add_subplot( 1 , 2 , 1 , projection = '3d' )
surf = ax.plot_surface(X, Y, Z, rstride = 1 , cstride = 1 ,
cmap = cm.coolwarm,
linewidth = 0 , antialiased = False )
ax.set_zlim(- 1.01 , 1.01 )
fig.colorbar(surf, shrink = 0.5 , aspect = 10 )

#2
ax = fig.add_subplot( 1 , 2 , 2 , projection = '3d' )
surf = ax.plot_surface(X, Y, Z, rstride = 1 , cstride = 1 ,
cmap = cm.coolwarm,
linewidth = 0 , antialiased = True )
ax.set_zlim(- 1.01 , 1.01 )
fig.colorbar(surf, shrink = 0.5 , aspect = 10 )


plt.show()