var('x,y')
f = x^2+y^2
myplot=contour_plot(f,(-3,3),(-3,3), fill=False, cmap='prism', contours=[0.5*t for t in range(-8,8)])
gradient_field = plot_vector_field([f.diff(x),f.diff(y)], (x,-3,3),(y,-3,3))
show(myplot+gradient_field, figsize=(4,4))
html('<h2> Contour plot and gradient field of $f(x,y) = %s$ </h2>' %latex(f))