* Richard A. DeVenezia 11/24/2002; * Quadrants of a circle as a SAS/Graph font; * http://www.devenezia.com; %let WORKPATH = %sysfunc(pathname(WORK)); libname GFONT0 "&WORKPATH."; data fontdata; length char $1 seg x y 8 lp ptype $1; char = 'A'; do q1 = 'L', 'P'; do q2 = 'L', 'P'; do q3 = 'L', 'P'; do q4 = 'L', 'P'; lp = q1; link Q1; x=.; y=.; output; lp = q2; link Q2; x=.; y=.; output; lp = q3; link Q3; x=.; y=.; output; lp = q4; link Q4; x=.; y=.; output; char = byte (rank(char)+1); end; end; end; end; stop; Q1: seg = 1; if lp = 'P' then do; x = 0; y = 0; ptype = 'V'; output; end; x = 1; y = 0; ptype = 'V'; output; x = 0; y = 0; ptype = 'C'; output; x = 0; y = 1; ptype = 'V'; output; return; Q2: seg = 2; if lp = 'P' then do; x = 0; y = 0; ptype = 'V'; output; end; x = 0; y = 1; ptype = 'V'; output; x = 0; y = 0; ptype = 'C'; output; x = -1; y = 0; ptype = 'V'; output; return; Q3: seg = 3; if lp = 'P' then do; x = 0; y = 0; ptype = 'V'; output; end; x = -1; y = 0; ptype = 'V'; output; x = 0; y = 0; ptype = 'C'; output; x = 0; y = -1; ptype = 'V'; output; return; Q4: seg = 4; if lp = 'P' then do; x = 0; y = 0; ptype = 'V'; output; end; x = 0; y = -1; ptype = 'V'; output; x = 0; y = 0; ptype = 'C'; output; x = 1; y = 0; ptype = 'V'; output; return; run; goptions reset=all target=png vsize=1in hsize=4in goutmode=replace; ods listing close; ods html file="&WORKPATH.\quadrants.html" gpath="&WORKPATH."; proc gfont nodisplay name=Quadrant data=fontdata filled resolution=3 ; run; data anno; style = "Quadrant"; retain xsys ysys '1' hsys '3' x 50; * size(pct) = hsize(in)/vsize(in)*100; size = .10/1*100; text = ' A B C D E F G H I J K L M N O P '; y = 80; output; y = 65; text = ' P O N M L K J I H G F E D C B A '; output; size = .15/1*100; text = ' A B C D E F G H I J K L M N O P '; y = 35; output; y = 15; text = ' P O N M L K J I H G F E D C B A '; output; run; proc gslide anno=anno name="quadrant"; run; quit; ods html close;