update g_contour.m