%let name=first; filename odsout '.'; /* This is a variation of the first wafermap I did, several years ago - this is where it all started :) */ data my_data; input x y value; /* Add a variable to use as the area= in the block map */ areavar='foo'; id = trim(left(x))||','||trim(left(y)); /* Output the 4 coordinates for a square map area */ output; x=x+1; output; y=y+1; output; x=x-1; output; datalines; 3 0 5 4 0 6 2 1 5 3 1 6 4 1 5 5 1 6 1 2 7 2 2 6 3 2 5 4 2 5 5 2 6 6 2 7 0 3 7 1 3 6 2 3 5 3 3 5 4 3 5 5 3 5 6 3 6 7 3 7 0 4 7 1 4 6 2 4 5 3 4 5 4 4 5 5 4 5 6 4 6 7 4 7 1 5 7 2 5 6 3 5 5 4 5 6 5 5 8 6 5 8 2 6 6 3 6 6 4 6 7 5 6 8 3 7 7.5 4 7 7 ; run; data my_data; set my_data; length myhtml $254; myhtml= 'title='||quote( 'id: '||trim(left(id))||'0D'x|| 'x: '||trim(left(x))||'0D'x|| 'y: '||trim(left(y))||'0D'x|| 'value: '||trim(left(value)) )|| ' href="first_info.htm"'; run; proc sql noprint; create table lablanno as select unique id, avg(x) as x, avg(y) as y, value from my_data group by id; quit; run; data lablanno; set lablanno; xsys='2'; ysys='2'; hsys='3'; when='A'; position='5'; size=4; style="albany amt"; function='label'; text=trim(left(value)); run; goptions device=png; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" (title="SAS/Graph gmap, representing silicon wafer map") style=sasweb; goptions ftitle="albany amt/bold" ftext="albany amt" htitle=6pct htext=4pct; /* left-justify the legend text so it's closer to it's color chicklet, and make the color chicklets a little more square */ legend1 value=(justify=left) shape=bar(4,1.2); pattern1 v=s c=cx0000ff; pattern2 v=s c=cx00ff00; pattern3 v=s c=yellow; pattern4 v=s c=cxff8800; pattern5 v=s c=cxff0000; title1 ls=1.5 "Silicon Wafer Map"; title2 "choro"; proc gmap data=my_data map=my_data all anno=lablanno; id id; choro value / discrete coutline=black legend=legend1 html=myhtml des='' name="&name"; run; title2 "prism"; proc gmap data=my_data map=my_data all; id id; prism value / discrete coutline=black xview=-.75 legend=legend1 html=myhtml des='' name="&name"; run; /* Pattern for the map areas (could be 'mempty' or 'msolid' pattern). The default pattern is cross-hatch. */ pattern6 v=mempty c=black; title2 "block"; proc gmap data=my_data map=my_data all; id id; block value / discrete /* Color the map surface area by the values in id variable #1, which is the 'areavar' - this allows me to have solid-color surface, rather than the default hatch patterns */ area=areavar blocksize=8 shape=cylinder xview=-.75 legend=legend1 html=myhtml des='' name="&name"; run; quit; ODS HTML CLOSE; ODS LISTING;