Ladder graph with different line patterns for rungs.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Ladder graph with different line patterns for rungs.

Art Kendall
Unfortunately I have very little net access at the moment.
In a previous post I asked about creating ladder graphs for pre post data.
(see syntax below)

How could I do something similar but with rungs representing subgroups in different colors or in different patterns?
data list list/ gender (f1) PreTest PostTest (2f3.1).
begin data
1 4.1 4.3
1 2.5 5.3
1 4.6 3.3
1 4.1 4.8
1 3.3 5.6
1 3.6 3.8
1 3.0 5.7
1 4.1 1.7
1 4.5 4.8
1 5.2 3.5
2 4.6 4.3
2 3.6 4.5
2 3.6 5.0
2 4.1 4.8
2 4.3 4.1
2 5.3 2.5
2 3.3 4.6
2 4.8 4.1
2 5.6 3.3
2 3.8 3.6
2 5.7 3.0
2 1.7 4.1
2 4.8 4.5
2 3.5 5.2
2 4.3 4.6
2 4.5 3.6
2 5.0 3.6
2 4.8 4.1
2 5.3 5.3
2 5.5 5.5
2 6.1 6.1
end data.
GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=PreTest PostTest MISSING=LISTWISE REPORTMISSING=NO
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: PreTest=col(source(s), name("PreTest"))
  DATA: PostTest=col(source(s), name("PostTest"))
  TRANS: pre = eval("Pre")
  TRANS: pos = eval("Post")
  GUIDE: axis(dim(1))
  GUIDE: axis(dim(2), label("Test Scores"))
  ELEMENT: edge(position((pre*PreTest)+(pos*PostTest)))
END GPL.

Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Ladder graph with different line patterns for rungs.

Andy W
VALUE LABELS gender 1 'M' 2 'F'.
GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=PreTest PostTest gender
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: PreTest=col(source(s), name("PreTest"))
  DATA: PostTest=col(source(s), name("PostTest"))
  DATA: gender=col(source(s), name("gender"), unit.category())
  TRANS: pre = eval("Pre")
  TRANS: pos = eval("Post")
  GUIDE: axis(dim(1))
  GUIDE: axis(dim(2), label("Test Scores"))
  ELEMENT: edge(position((pre*PreTest)+(pos*PostTest)), color(gender))
END GPL.
Andy W
apwheele@gmail.com
http://andrewpwheeler.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

Re: Ladder graph with different line patterns for rungs.

Art Kendall
Thank you. I'll try that when I return home.
Art Kendall
Social Research Consultants