I am trying to barchart using proc sgrender. My dataset has variable called ID with 2 different values for time ,group and reasons. To plot data points correctly I formatted ID in such a way that it has values _n_ according to the data. ID TIME group id_ reasons length stat statvar 1 5 A 1 xxx 6 35 age 1 6 B 2 yyy 7 asian ethinic country xxx xxx yyy I calculated length variable from time so that that graph plot value just above the bar . length = time+1; I want to create bar chart in such a way that group A and B gets different colors for the corresponding ID and there shouldn't be any space between bars. The code I used is proc template; define statgraph barcolors; dynamic xvar yvar; begingraph; discreattrmaps name='catcolors'/ignorecase=true VALUE 'A'/FILLATTRS(COLOR=BLUE); VALUE 'B'/FILLATTRS(COLOR=RED); enddiscretattrmaps; discreattrmaps attrvars=group var=group attrmap='catcolors'; layout overlay/ yaxisopts----- xaxisopt------------ barchartparam x = id_ y = time/primary=yes groups = group groupdisplay = cluster name='colors' scatterplot x =id_ y = length/markerattrs=(size=5 weight=bold)group=reasons; The problem I have is since id_ has different value for same ID , it create a space between bars. If I use ID instead of id_ in scatterplot then all the reasons goes to first bar not to corresponding bar. How can I tell SAS not to put space between bars for each ID? I am also trying to put a table under graph. since there are 2 bars for each ID, graph is having trouble to put values under each ID in the table. Is there any solution for this too? boxplot x= id_ y = stat/class=varstat;
... View more