LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2002, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 21 Nov 2002 19:32:13 GMT
Reply-To:   "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Organization:   EarthLink Inc. -- http://www.EarthLink.net
Subject:   Re: Harvey Balls
Content-Type:   text/plain;

"Alex Schneider" <ASchneider56@hotmail.com> wrote in message news:e4_C9.4$U9.37428@dca1-nnrp1.news.algx.net... > A speaker at a meeting I attended used "Harvey Balls" to graphically > indicate which of three groups (good, fair, poor) cetain organizations' > performance fell into, with respect to certain attributes. In response to a > question, he mentioned that these originated with someone named Harvey, and > that Consumer Reports uses them extensively to show product ratings. I've > also seen them in PC magazines. > > The concept is, that a ball can be one of four symbols: Solid black, top > half black, bottom half black, all white. I think I've seen them in multiple > colors so that at least 5 ratings are available, perhaps excellent, good, > fair, poor, terrible or something like that. > > Question: does SAS / Graph ( or any other SAS product) offer a Harvey - > ball output? > > Thanks in advance. > > Alex Schneider >

Wasn't Harvy Ball the guy who 'invented' the smiley face ?

Anyway, you can make your own fonts using Proc GFONT. There is great prior work on using GFONT to create dynamic glyphs (That have no 'literal' sense, but rather a 'graphical' sense) for presenting information in quality control or categorical analysis. Apologies to the author if I am mistake, I believe "Visualizing Categorical Data" by Michael Friendly has a section covering the technique.

GFONT is poorly documented in Online Help (F1). GFONT is properly documented in OnlineDoc and SAS/Graph print references.

Here is a stub you can work with:

libname GFONT0 'c:\temp';

data hbfont; 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; lp = q3; link Q3; lp = q4; link Q4; 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;

ods listing close; ods html file='c:\temp\rich.html' gpath='c:\temp';

goptions display;

proc gfont name=HarvBall data=hbfont filled h=5; run;

data anno; style = "HarvBall"; retain xsys ysys '1'; text = ' A B C D E F G H I J K L M N O P '; retain x y 50; output; y = 40; text = ' P O N M L K J I H G F E D C B A '; output; run;

proc gslide anno=anno; run; quit;

ods html close;

-- Richard A. DeVenezia http://www.devenezia.com/downloads/sas/macros


Back to: Top of message | Previous page | Main SAS-L page