I am trying to get grouped line graphs. My syntax now looks like this:
* Chart Builder.
/GRAPHDATASET NAME="graphdataset" VARIABLES=ageSBR MEDIAN(result)[name="MEDIAN_result"] ABE egawk
PAGE: begin(scale(1000px,2500px)) SOURCE: s=userSource(id("graphdataset"))
DATA: ageSBR=col(source(s), name("ageSBR"))
DATA: MEDIAN_result=col(source(s), name("MEDIAN_result"))
DATA: ABE=col(source(s), name("ABE"), unit.category())
DATA: egawk=col(source(s), name("egawk"), unit.category())
GUIDE: axis(dim(1), label("Age of the baby in hours at time of SBR measurement"))
GUIDE: axis(dim(2), delta(50), label("Median Result of SBR level in mgr/L"))
GUIDE: axis(dim(4), label("ega in weeks, egadob truncated"), opposite())
GUIDE: legend(aesthetic(aesthetic.color.interior), label("ABE signs following study definition"))
SCALE: linear(dim(1), max(360))
SCALE: linear(dim(2), max(800))
SCALE: cat(aesthetic(aesthetic.color.interior), include("2", "1", "0"), sort.values("2", "1",
ELEMENT: line(position(ageSBR*MEDIAN_result*1*egawk), color.interior(ABE), missing.interpolate())
I’d like to have graphs grouped on ega in weeks (egawk) showing three lines that refer to three categories of the variable ABE. With result on Y and age on X.
This is working now. But I’d like to have a label to every line which will tell me the count of cases that were available to create this line. So for example the line ABE=2 has 2 cases for ega=32, then I would like to see a label with 2. Or the line ABE=1 has 5 cases for ega=37 then I would like to see a label with 5.
Also it would be great to have a reference line in every row, that has a different equation for every ega.
Hope someone can help me with this….
Thank you in advance!
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
For a list of commands to manage subscriptions, send the command
It would help if you provided a simplified set of your data, but here is a shot untested to do the count labels you ask for. See the COUNT aggregation variable and the second point element to draw the labels.