proc format; value PlayerName 1 = "Mom" 2 = "Rick"; run; data scrabble; input Game Player @@; label Cumul = "Cumulative Score" Score = "Score for Turn"; Cumul = 0; do Turn = 1 to 20; input Score @@; Cumul + Score; if Score^=. then output; end; format Player PlayerName.; datalines; 1 1 20 15 12 24 11 9 9 18 14 16 14 20 23 14 11 10 8 10 8 -10 1 2 12 11 9 5 7 27 12 5 14 26 18 12 17 8 11 13 36 4 3 -1 2 1 14 30 8 13 16 11 12 8 26 12 8 27 27 12 5 15 9 7 2 -5 2 2 22 18 3 11 34 21 5 3 11 18 13 12 25 18 14 15 22 12 5 -2 3 1 18 16 20 26 17 16 20 12 15 12 33 17 26 6 5 -4 . . . . 3 2 20 12 20 15 42 10 6 18 14 15 6 15 10 8 19 6 . . . . 4 1 18 6 14 14 10 7 30 27 14 18 18 12 12 8 18 8 . . . . 4 2 18 10 15 24 37 12 8 16 24 14 14 17 17 10 13 -3 . . . . ; run; proc means data=Scrabble; class Player; var Score; run; proc sgpanel data=Scrabble noautolegend; panelby Game; scatter x=Turn y=Cumul / group=Player transparency=0.75; series x=Turn y=Cumul / group=Player curvelabel; rowaxis integer grid; colaxis grid; run; proc sgpanel data=Scrabble noautolegend; panelby Player; histogram Score; density Score /type=kernel; run;