There is the DISPLAY LABELS command to see labels.
I don't know of a way to do that other than to manually edit the fields:
DATA LIST FREE /x.
BEGIN DATA.
1 2 3 4 5 6 7 8 9 10
END DATA.
VARIABLE LABELS x "My Variable Label".
DISPLAY LABELS.
* I see labels by default...
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=x COUNT()[name="COUNT"] MISSING=LISTWISE
REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
GUIDE: axis(dim(1), label("My Variable Label"))
GUIDE: axis(dim(2), label("Count"))
GUIDE: text.title(label("Simple Bar Count of My Variable Label"))
SCALE: linear(dim(2), include(0))
ELEMENT: interval(position(x*COUNT), shape.interior(shape.square))
END GPL.
** You can change GUIDE for axis and title manually, of course...
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=x MISSING=LISTWISE REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
GUIDE: axis(dim(1), label("x"))
GUIDE: axis(dim(2), label("Frequency"))
GUIDE: text.title(label("Bar of x"))
ELEMENT: interval(position(summary.count(bin.rect(x))), shape.interior(shape.square))
END GPL.
------------------------------
Rick Marcantonio
Quality Assurance
IBM
------------------------------
Original Message:
Sent: Fri June 24, 2022 09:59 AM
From: Michael O'Brien
Subject: How Specify variable label be used in ggraph not variable name
Is there a way in syntax to specify that the variable label not the variable name be used for graph titles or axis labels
failing that is there a way to output the variable label prior to calling the ggraph? If I use Display /variables var1
I get the variable name not the label
------------------------------
Michael
------------------------------
#SPSSStatistics