Generate the last contour plot. JOIN combines grid cells for the same contour levels.
proc gcontour data=reflib.swirl;
   plot y*x=z / pattern
                join
                haxis=axis1
                vaxis=axis2
                legend=legend1;
run;
quit;