You have a sharp eye. I messed up the cut and paste. Unfortunately, I could not see how to edit a post when I realized that.
Here is a more simplified example, with %annomac and %hbar macros, the internal files and outputs:
As you can see the anno dataset looks correct.
It appears that with character coodinates, you cannot do fills.
Thank you.
Stan
data source;
length barcolor text $8. ;
location = 'Rm-01'; starttime='08:00't; endtime='15:30't; barcolor = 'red'; text= 'red'; output;
location = 'Rm-02'; starttime='08:30't; endtime='16:00't; barcolor = 'white'; text= 'white'; output;
location = 'Rm-03'; starttime='08:15't; endtime='15:15't; barcolor = 'blue'; text= 'blue';output;
run;
options symbolgen;
%let SZ=44;
%annomac;
data anno (rename=(y=yc));
length style $5. ;
length function $12. ;
retain xsys ysys '2' size &SZ ;
set source ;
put location= starttime= endtime= barcolor= text= ;
line=0; style ='Empty'; color=barcolor;
%BAR2(starttime, location, endtime, location, *, line, R5, &SZ);
run;
/* Set Symbols and Axes */
symbol1 i=none;
axis1 label=none;
axis2 order=(21600 to 72000 by 3600) minor=none
label=(h=1.5 "Time of Day") Value=(h=1);
/* Plot the Timeline */
proc gplot annotate=anno ;
plot location*EndTime/vaxis=axis1 haxis=axis2 VREVERSE
href= 21600 25200 28800 32400 36000 39600 43200 46800
50400 54000 57600 61200 64800 68400 72000
lhref=4;
format EndTime time5.;
run;
**** Here is source:
barcolor text location starttime endtime
red red Rm-01 28800 15:30
white white Rm-02 30600 16:00
blue blue Rm-03 29700 15:15
**** Here is anno ****
style function xsys ysys size barcolor text location starttime endtime line color X yc
Empty MOVE 2 2 44 red red Rm-01 28800 55800 0 red 28800 Rm-01
R5 BAR 2 2 44 red red Rm-01 28800 55800 0 red 55800 Rm-01
Empty MOVE 2 2 44 white white Rm-02 30600 57600 0 white 30600 Rm-02
R5 BAR 2 2 44 white white Rm-02 30600 57600 0 white 57600 Rm-02
Empty MOVE 2 2 44 blue blue Rm-03 29700 54900 0 blue 29700 Rm-03
R5 BAR 2 2 44 blue blue Rm-03 29700 54900 0 blue 54900 Rm-03
Here is the output
... View more