Rick,
I found a problem in my code.
Sometimes for some dataset, my code would reverse the black and white(a.k.a white is missing ,black is non-missing).
I have to use DATTRMAP to correct this kind of problem.

data Test;
input x1-x5;
datalines;
. . . . .
1 . 3 4 5
1 2 3 4 5
1 2 3 . 5
1 2 3 4 5
. . 3 4 .
1 2 3 4 .
. . 3 4 .
. . 3 4 5
1 2 3 4 .
;

%let dsn=test;

proc transpose data=&dsn(obs=0) out=temp;
var _all_;
run;

proc sql noprint;
select catx(' ','missing(',_name_,') as ',_name_)
into :names separated by ','
from temp;
select _name_ into :vars separated by ' '
from temp;
create table want as
select &names. from &dsn;
quit;

data want;
set want;
_obs+1;
run;

proc transpose data=want out=want2;
by _obs;
var &vars.;
run;

data dattrmap;
input id $ value fillcolor $;
cards;
id 0 white
id 1 black
;

proc sgplot data=want2 dattrmap=dattrmap;
heatmapparm x=_name_ y=_obs colorgroup=col1/x2axis attrid=id;
yaxis reverse integer ;
x2axis type=discrete tickstyle=inbetween display=(nolabel);
run;