*SPSS syntax example by www.spss-tutorials.com.

*Appendix to https://www.spss-tutorials.com/spss-correlations-command/.

data list free/id.
begin data
0 0 0 0 0    0 0 0 0 0    0 0 0 0 0    0 0 0 0 0    
end data.

set seed 2.
compute id = $casenum.
compute v1 = rv.normal(100,15).
compute v2 = rv.normal(100,15).

set ctemplate none.

*As pasted from legacy dialog.

GRAPH
/SCATTERPLOT(BIVAR)=v2 WITH v1 BY id (IDENTIFY)
/MISSING=LISTWISE.

*No case labels in chart.

*Suggestion by Jon Peck.

GRAPH
/SCATTERPLOT(BIVAR)=v2 WITH v1 BY id (NAME)
/MISSING=LISTWISE.

*Case labels in chart.