Question

I am trying to draw scatter diagrams with interpolate lines using SPSS 21 and 22. However, the caption generated by the SPSS shows captions of remarks and interpolation line separately. Look at the left side of the picture enter image description here. However, I need to find out a way to merge the captions and make a caption like the one appeared in right side of the figure.


I have searched the web and I have manipulated all components of the Element Type tab in Property window of SPSS output. But could not figure it out. Please help.

No correct solution

OTHER TIPS

SPSS unfortunately will not combine different geometric elements like that in the legend. For your example graph on the left what I would do is suppress the line and only display the shape and outline color in the legend. It is redundant with the color of the line so should be obvious. See the GUIDE: legend statements in the inline GPL on how to do this.

DATA LIST FREE / X Y Group.
BEGIN DATA
1 0 1
2 0 1
3 0 1
1 1 2
2 1 2
3 1 2
1 2 3 
2 2 3
3 2 3
END DATA.
FORMATS X Y Group (F1.0).

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=X Y Group
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: X=col(source(s), name("X"))
  DATA: Y=col(source(s), name("Y"))
  DATA: Group=col(source(s), name("Group"), unit.category())
  GUIDE: axis(dim(1), label("X"), delta(1))
  GUIDE: axis(dim(2), label("Y"), delta(1))
  GUIDE: legend(aesthetic(aesthetic.color.interior), null())
  GUIDE: legend(aesthetic(aesthetic.color.exterior), label("Group"))
  SCALE: linear(dim(2), min(-0.25))
  ELEMENT: line(position(X*Y), color.interior(Group), missing.wings())
  ELEMENT: point(position(X*Y), color.exterior(Group), shape(Group), size(size."14"))
END GPL.

And here is the graph and legend produced with my default chart template.

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top