01-24-2012 05:34 AM
I'm using this code
PROC SGSCATTER DATA=input;
MATRIX alpha beta / GROUP=var_group
I would like to add axis legend: how could I do?
Thanks in advance for any helpKind regards
01-24-2012 10:11 AM
I'm not sure what you mean by an axis legend. Do you mean that you want the variables names (or labels) to be displayed next to the axes? If so, I don't think you can get that with the MATRIX statement, but you can use the PLOT or COMPARE statements. For example, the following code arranges two plots in a panel and labels all axes:
PROC SGSCATTER DATA=sashelp.class;
compare x=(height age) y=weight / GROUP=sex;
01-24-2012 10:37 AM
In SAS 9.2, maintenance 3, we added support for axis legends in the Graph Template Language (GTL); but the SG procedures do not currently support them. Also, be aware that an axis legend can be associated with only one axis; therefore, you would need multiple legends for multiple axes. I'm still not sure about your use case. Is it a scatter plot matrix with long axis values?
01-24-2012 03:42 PM
Multple axis legends are supported. I was just making the point that you can only have one axis per legend, as opposed to a DISCRETELEGEND, where you can have multiple plots in the same legend. Do you have 9.2m3?