user10745594
user10745594

Reputation:

How do I add frequency to each group in a scatter plot in SAS?

I am trying to add a freq count (n=) for each group in my scatter plot.

proc sgplot data= FrequencyAdd(where=(count = 6 and person = "Jim"));   
    scatter x=adm_dt y=Brand/ group = Brand freq=Freq_Flag;
run;

The frequency flag is always equal to 1 and keeps track of individuals.

Any suggestions?

Upvotes: 0

Views: 362

Answers (1)

Reeza
Reeza

Reputation: 21274

Assuming the information is in your data set, in a variable called FREQ try using a TEXT statement.

text x=adm_dt y=brand text=Freq;

https://documentation.sas.com/?docsetId=grstatproc&docsetTarget=n0lprj1bdrlrkgn1vmqnd7r6fnry.htm&docsetVersion=9.4&locale=en

You do need a later version of SAS for this, 9.4 M1+ I believe.

Upvotes: 0

Related Questions