/*--Project the map data--*/ proc gproject data=maps.states(where=(density<3 and (state =37))) out=ncp; id state; run; /*--Add closing line segment to each segment--*/ data nc; set ncp; retain x1 y1; keep state segment x y; by segment; /*--Save first vertex for each segment--*/ if first.segment=1 then do; x1=x; y1=y; output; end; else output; /*--Append first vertex as last point for each segment--*/ if last.segment=1 then do; x=x1; y=y1; output; end; run; /*--Define template for map--*/ proc template; define statgraph MapSeries; begingraph; entrytitle 'North Carolina'; layout overlayequated / xaxisopts=(display=none) yaxisopts=(display=none); seriesplot x=x y=y / group=segment lineattrs=graphdatadefault(thickness=2); endlayout; endgraph; end; run; /*--Render the graph--*/ ods graphics / reset width=5in height=3in imagename='Map_GTL_Series'; proc sgrender data=nc template=MapSeries; run;