/***************************************************************************************************************** SAS file name: Range_Attrmap File location: _________________________________________________________________________________________________________________ Purpose: To demonstrate how to use Range Attribute Maps in PROC SGPLOT Author: Peter Clemmensen Creation Date: 18/04/2017 This program supports the example page "Range Attribute Map in PROC SGPLOT" on SASnrd.com *****************************************************************************************************************/ /* Create range attribute map data set */ data MyAttrmap; length ID $4 min $8 max $8 color $6 altcolor $6; input ID min$ max$ color altcolor$; datalines; MyID _min_ 50 Green Green MyID 50 60 Gold Gold MyID 60 _max_ Red Red ; run; /* Draw scatter plot and use the range attribute map */ title "Iris Scatter Plot With Range Attribute Map"; proc sgplot data=sashelp.iris rattrmap=MyAttrmap; scatter x=SepalWidth y=SepalLength / colorresponse=SepalLength rattrid=MyID markerattrs=(symbol=CircleFilled); yaxis display=(nolabel novalues noticks); run; title;