Major fixes to plotting density contours