or, perhaps, when you selected and ran the code, you got only the BEGIN... END GPL part. Make sure to select all of that,
--
Original Message:
Sent: 6/24/2021 8:39:00 AM
From: Rick Marcantonio
Subject: RE: SPSS error#99 message for jitter scatter plot. What can I do?
Hi. I made up my own data, pasted your syntax exactly as it is in your note, and it ran with no problems in both versions 27 and 28 on a Mac.
data list free /v1 v2.
begin data.
1 0
2 1
3 1
3 0
1 0
2 1
2 1
1 1
1 0
end data.
variable level v1 v2 (ordinal).
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=V1 V2
MISSING=LISTWISE REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE
/FITLINE TOTAL=NO.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: V1=col(source(s), name("V1"), unit.category())
DATA: V2=col(source(s), name("V2"), unit.category())
GUIDE: axis(dim(1), label("V1"))
GUIDE: axis(dim(2), label("V2"))
SCALE: cat(dim(1), include("0.00", "1.00", "2.00", "3.00"))
SCALE: cat(dim(2), include("0.00", "1.00"))
ELEMENT: point.jitter(position(V1*V2))
END GPL.
And for me, FITLINE is already green (meaning that it is recognized as a valid subcommand) without adding anything:

I am guessing that an invisible character is embedded in your syntax file somewhere inside the GGRAPH command. I don't know what else it could be.
------------------------------
Rick Marcantonio
Quality Assurance
IBM
------------------------------
Original Message:
Sent: Thu June 24, 2021 01:42 AM
From: Guillaume D
Subject: SPSS error#99 message for jitter scatter plot. What can I do?
Hello everyone,
I want to get a jitter scatter plot on SPSS for two ordinal variables. I use the Graph Fonction and then I paste the syntax and add "jitter" where needed.
When I run the graph, I received this message : error # 99. Command name: BEGIN GPL >This command is only valid immediately following the GGRAPH procedure. >Execution of this command stops.
Here's my syntax:
DATASET ACTIVATE Dataset1. * Chart Builder.GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=V1 V2 MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE /FITLINE TOTAL=NO.BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: V1=col(source(s), name("V1"), unit.category()) DATA: V2=col(source(s), name("V2"), unit.category()) GUIDE: axis(dim(1), label("V1")) GUIDE: axis(dim(2), label("V2")) SCALE: cat(dim(1), include("0.00", "1.00", "2.00", "3.00")) SCALE: cat(dim(2), include("0.00", "1.00")) ELEMENT: point.jitter(position(V1*V2))END GPL.
I notice that /FITLINE TOTAL=NO.
is not an actual fonction, but when adding a "s" to FITLINE, it turns green, "TOTAL" turns red and "No". Running the syntax after this change does not do anything and I receive the same error message...
I just don't get it.
If anyone have thoughts it would be great. Your help would be greatly appreciated!
Cheers
------------------------------
Guillaume D
------------------------------
#SPSSStatistics