jim lemon jimbitwritcomau wed 20080806 1657 0700 daniel bernstein wrote hello id like say advance thank help andor advice problem follows dataset made percentages ive assigned error percentages value 100 nonexistent percentages value 0 percentages normal values range high 60s 100 would like create heatmap designates error values gray nonexistent values black would like rest values say 50 100 rainbowtype spectrum like palette spectral rcolorbrewer except 50 values ive tried using breaks implementing breaks heatmap2 command breaks work fine guess want control range colcolorpanel lowcolor1 midcolor2 highcolor3 command way set values low mid high possible think would solve problem ive looked documentation searched previous colorheatmaprelated questions havent come across anything points right direction hi daniel map values colors using colorscale plotrix package want would require separate 50 values get graduated colors set 100 0 values black gray say dataset matrix named mydata sneaky way might missvalwhichmydata 100 nonextwhichmydata 0 gives lowest value want color range mydatacmissvalnonext50 gives matrix colors start 50red range 100blue mycellcolorscolorscalemydatac1100c0110c00051 next two lines set colors missing nonexistent values mycellcolorsmissvalblack mycellcolorsnonextgray display matrix colors using calculated colors color2dmatplotmydatacellcolorsmycellcolors cant work image heatmap someone else might able tell jim ______________________________________________ rhelprprojectorg mailing list httpsstatethzchmailmanlistinforhelp please read posting guide httpwwwrprojectorgpostingguidehtml provide commented minimal selfcontained reproducible code thu 07 aug 2008 191853 1000 r attempting make custom color spectrum use heatmap2