0

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?

1 Answers1

0

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.

Reeza
  • 20,510
  • 4
  • 21
  • 38