Dear all,
I'm using this code
PROC SGSCATTER DATA=input;
MATRIX alpha beta / GROUP=var_group
START=TOPLEFT ;
RUN;
I would like to add axis legend: how could I do?
Thanks in advance for any help
Kind regardsI'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;
RUN;
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?
Dear Dan
Yes I'll need multiple legends for multiple axes.
Ok now I'm sure that's not possible.
Thank you in advance
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?
I'm using SAS ENTRIPRISE GUIDE 4.3 and SAS 9.2
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.