Excellent, glad you were able to figure it out Alexander.
For anyone else who wonders what the difference is:
This:
DATA: Training_type=col(source(s), name("age"), unit.category())
versus this:
DATA: Training_type=col(source(s), name("Training_type"), unit.category())
The "Training_type" variable was needed where previously there was "age".
------------------------------
Curtis Browning
SPSS Statistics Architect
------------------------------
Original Message:
Sent: Sun October 17, 2021 04:04 AM
From: Alexander Farr
Subject: Two box plots in one figure: Empty graph
I found the bug, this one works:
DATASET ACTIVATE DataSet1.USE ALL.EXECUTE.DATASET ACTIVATE DataSet1./*Boxplot for age, both should be next to each other* Chart Builder.GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=Training_type Age MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE.BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: Training_type=col(source(s), name("Training_type"), unit.category()) DATA: Age=col(source(s), name("Age")) DATA: id=col(source(s), name("$CASENUM"), unit.category()) GUIDE: axis(dim(1), label("Training_type")) GUIDE: axis(dim(2), label("Age")) GUIDE: text.title(label("Simple Boxplot of Age by treatment group")) SCALE: linear(dim(2), include(0)) ELEMENT: schema(position(bin.quantile.letter(Training_type*Age)), label(id))END GPL.
------------------------------
Alexander Farr
------------------------------