I am working on some repeating plots for different subgroups by using the same program with multiple macro calls, the categories in the legend vary in the different subgroups which is data driven. Here is the code I am using in PROC SGPLOT: proc sgplot data=final ; styleattrs datacontrastcolors=(blue red gray); hbarparm category=&subjid_trtp. response=trtedy/group=MDM2 name="GRPS" barwidth=.5 ; .......... ......... keyLEGEND "GRPS" /location=outside title="MDM2 Status" linelength=15pt titleattrs=(size=6) VALUEATTRS= (size=6); run; Here are the outputs in different subgroups. Plot 1: Plot 2: Here are the related values assigned in the final datasets. Plot 1: Plot 2: not sure why "Myxofibrosarcoma^{unicode '207F'x}" is not working in the plot 2, {unicode '207F'x} is supposed to show the mesh symbol. Now I want to display the same symbol and color in the legend for each category as the plot 1 shows in all the plots, just wonder how to make it happen. Thanks in advance.
... View more