Rasterize and contour plot generation improvements