data one;
input time time5. +1 day date7. temp;
negday=-day;
datalines;
 0:00 01jan96 22
 6:00 01jan96 33
12:00 01jan96 45
18:00 01jan96 37
 0:00 08jan96 24
 6:00 08jan96 18
12:00 08jan96 24
18:00 08jan96 20
 0:00 15jan96 36
 6:00 15jan96 30
12:00 15jan96 48
18:00 15jan96 41
 0:00 22jan96 40
 6:00 22jan96 33
12:00 22jan96 38
18:00 22jan96 35
 0:00 29jan96 16
 6:00 29jan96 13
12:00 29jan96 24
18:00 29jan96 20
;

proc means data=one noprint;
   var day;
   output out=meands min=mindate max=maxdate;
run;

data _null_;
   set meands;
   call symput("mindate",mindate);
   call symput("maxdate",maxdate);
run;

data custom;
   retain fmtname 'datefmt' type 'N';
   do day=&mindate to &maxdate by 1;
      label=put(day,date7.);
      start=(-day)-1;
      end=-day;
      output;
   end;
run;

proc format cntlin=custom;
run;

   /* default order for y-axis                             */
proc g3d data=one;
scatter day*time=temp/xticknum=4 yticknum=5 shape='pillar'
   zmin=0 zmax=50 grid zticknum=6;
format day date7. time time5.;
title h=5 pct 'Default Ordering of Dates on Y Axis';
footnote h=3 pct j=r 'Figure 4';
run;
quit;

   /* reverse order for y-axis                             */
proc g3d data=one;
scatter negday*time=temp/xticknum=4 yticknum=5 shape='pillar'
   zmin=0 zmax=50 grid zticknum=6;
format negday datefmt. time time5.;
label negday='DAY';
title h=5 pct 'Reversed Ordering of Dates on Y Axis';
footnote h=3 pct j=r 'Figure 5';
run;
quit;