Data visualization with SAS programming

help with proc sgscatter

Reply
Contributor L_L
Contributor
Posts: 56

help with proc sgscatter

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

SAS Super FREQ
Posts: 3,620

help with proc sgscatter

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;

SAS Super FREQ
Posts: 925

help with proc sgscatter

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?

Contributor L_L
Contributor
Posts: 56

help with proc sgscatter

Dear Dan

Yes I'll need multiple legends for multiple axes.

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

Thank you in advance 

SAS Super FREQ
Posts: 925

help with proc sgscatter

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?

Contributor L_L
Contributor
Posts: 56

help with proc sgscatter

I'm using SAS ENTRIPRISE GUIDE 4.3  and SAS 9.2

Ask a Question
Discussion stats
  • 5 replies
  • 221 views
  • 6 likes
  • 3 in conversation