December 2017
Intermediate to advanced
386 pages
10h 42m
English
Run the following code in a Jupyter code cell:
from mpl_toolkits.mplot3d import Axes3Dfrom matplotlib import cmf = lambda x,y: x**3 - 3*x*y**2fig = plt.figure(figsize=(12,6))ax = fig.add_subplot(1,2,1,projection='3d')xvalues = np.linspace(-2,2,100)yvalues = np.linspace(-2,2,100)xgrid, ygrid = np.meshgrid(xvalues, yvalues)zvalues = f(xgrid, ygrid)surf = ax.plot_surface(xgrid, ygrid, zvalues, rstride=5, cstride=5, linewidth=0, cmap=cm.plasma)ax = fig.add_subplot(1,2,2)plt.contourf(xgrid, ygrid, zvalues, 30, cmap=cm.plasma)fig.colorbar(surf, aspect=18)plt.tight_layout()None
Running this code will produce a plot of the monkey saddle surface, which is a famous example of a surface with a non-standard critical point. The displayed ...
Read now
Unlock full access