form.line position with date-formatted axes
Posted by JeremyT on
URL: http://spssx-discussion.165.s1.nabble.com/form-line-position-with-date-formatted-axes-tp5741098.html
Apologies to those who have seen this on the now disconnected SPSSX list!
I am trying to display reference lines on a date formatted axis. I am obviously not specifying the date position correctly for the line but cannot work out what it should be: your wisdom would be appreciated Syntax below generates an example with 3 form lines but only the one on the numerical y axis is shown.
cheers
Jeremy
* Encoding: UTF-8.
DATA LIST FREE / Date (date11) Growth (F2.1).
BEGIN DATA
06-Sep-2020 .00
06-Apr-2020 .32
12-Aug-2020 .00
15-Jun-2020 .00
18-Jun-2020 .00
16-Jun-2020 .00
18-Jun-2020 .00
09-Aug-2020 .00
31-Jul-2020 .00
04-Sep-2020 .01
10-Oct-2020 .01
12-Oct-2020 .00
END DATA.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=Date Growth MISSING=LISTWISE REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: Date=col(source(s), name("Date"))
DATA: Growth=col(source(s), name("Growth"))
GUIDE: axis(dim(1), label("Date"))
GUIDE: axis(dim(2), label("Growth"))
GUIDE: form.line(position(13811558400, *))
GUIDE: form.line(position("15-Jun-2020", *))
GUIDE: form.line(position(*, 0.2))
ELEMENT: line(position(Date*Growth), missing.wings())
END GPL