# Here's the same plot, except we show some of the level curves of g on the same axes.# Note how all the gradient vectors are perpendicular to the level curves.plot_vector_field(g.gradient(),(x,-2,2),(y,-2,2))+\contour_plot(g,(x,-2,2),(y,-2,2),fill=False,plot_points=100,contours=20,cmap='winter')
# Another example similar to the above, with sunnier contours.var('x,y')h=e^x*cos(y)plot_vector_field(h.gradient(),(x,-1,0.5),(y,0,2*pi))+\contour_plot(h,(x,-1,0.5),(y,0,2*pi),fill=False,plot_points=100,contours=15,cmap='autumn')