Date: Wed, 19 May 2004 14:31:18 -0400
Reply-To: "Michael S. Zdeb" <msz03@HEALTH.STATE.NY.US>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Michael S. Zdeb" <msz03@HEALTH.STATE.NY.US>
Subject: Re: Plotting spectrum colors
Content-type: text/plain; charset=us-ascii
Hi. I haven't seen trhis mentioned in any of the replies to the original
note. In V9, it's now possible to avoid the hex code when speciying
colors. There is a suite of macros that become available once you submit
%COLORMAC. The suggested cure to the original problem with..
%macro heatmap;
%do k=1 %to 90;
%let deg=%sysfunc(putn(%sysfunc(mod(360+92-4*&k,360)),z3.));
pattern&k value=msolid color=h°.7595;
%end;
<more SAS code>
was to use a HEX format...
%macro heatmap;
%do k=1 %to 90;
%let deg=%sysfunc(putn(%sysfunc(mod(360+92-4*&k,360)),hex3.));
pattern&k value=msolid color=h°.7595;
%end;
<more SAS code>
Question --- are the 75 and 95 hex code or should they be converted...
pattern&k value=msolid color=h°.4b5f;
Anyway, in V9...
%colormac;
%macro heatmap;
%do k=1 %to 90;
%let deg=%sysfunc(putn(%sysfunc(mod(360+92-4*&k,360)),z3.));
pattern&k value=msolid color=%hls(°,75,95);
%end;
<more SAS code>
There are a lot more color-related macros (%rgb, %cmy, %cmyk among them).
One catch is that if you have defined a SASAUTOS option, you need the add a
new location to keep %COLORMAC in the search path.
%COLORMAC is in the !SASROOT\GRAPH\SASMACRO directory.
Mike Zdeb
U@Albany School of Public Health
1 University Drive
Rensselaer, NY 12144-3456
(P)518-402-6479
(F)630-604-1475