BookmarkSubscribeRSS Feed
L_L
Calcite | Level 5 L_L
Calcite | Level 5

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 regards

5 REPLIES 5
Rick_SAS
SAS Super FREQ

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;

RUN;

DanH_sas
SAS Super FREQ

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?

L_L
Calcite | Level 5 L_L
Calcite | Level 5

Dear Dan

Yes I'll need multiple legends for multiple axes.

Ok now I'm sure that's not possible.

Thank you in advance 

DanH_sas
SAS Super FREQ

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?

L_L
Calcite | Level 5 L_L
Calcite | Level 5

I'm using SAS ENTRIPRISE GUIDE 4.3  and SAS 9.2

sas-innovate-2024.png

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.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1351 views
  • 6 likes
  • 3 in conversation