我可以使用语法在SPSS中重命名分类X轴图形标签吗?

时间:2016-02-01 11:26:47

标签: syntax spss

在SPSS中,使用语法我绘制了一个折线图,其中x轴代表9个不同的类别。 Example of the plot I am working on

我有两个问题:

  1. 如何使用语法重命名x轴标签?我没有在每个类别中使用变量名称(例如:Auto_SDYaw_Sec1_E2),而是希望将它们重命名为" Sec 1"," Sec 2"等等。

    < / LI>
  2. 如何绘制第2个和第3个变量/ x轴类别之间的垂直线?

  3. 我可以使用以下代码在变量上绘制一条垂直线:

    GUIDE: form.line(position("2"), color(color.black))
    

    然而,改变位置&#39;到2.5不起作用。

    我的整个代码如下:

    * Chart Builder.
    GGRAPH
      /GRAPHDATASET NAME="graphdataset" VARIABLES=MEANSE(Auto_SDYaw_Sec1_E2, 2) MEANSE(Auto_SDYaw_Sec2_E2, 2) MEANSE(Auto_SDYaw_Sec3_E2, 2) MEANSE(Auto_SDYaw_Sec4_E2, 2) MEANSE(Auto_SDYaw_Sec5_E2, 2) MEANSE(Auto_SDYaw_Sec6_E2, 2) MEANSE(Auto_SDYaw_Sec7_E2, 2) MEANSE(Auto_SDYaw_Sec8_E2, 2) MEANSE(Auto_SDYaw_Sec9_E2, 2) LaneChange_Auto_2 MISSING=LISTWISE REPORTMISSING=NO
        TRANSFORM=VARSTOCASES(SUMMARY="#SUMMARY" INDEX="#INDEX" LOW="#LOW" HIGH="#HIGH")
      /GRAPHSPEC SOURCE=INLINE.
    BEGIN GPL
      SOURCE: s=userSource(id("graphdataset"))
      DATA: SUMMARY=col(source(s), name("#SUMMARY"))
      DATA: INDEX=col(source(s), name("#INDEX"), unit.category())
      DATA: LaneChange_Auto_2=col(source(s), name("LaneChange_Auto_2"), unit.category())
      DATA: LOW=col(source(s), name("#LOW"))
      DATA: HIGH=col(source(s), name("#HIGH"))
      GUIDE: form.line(position("2"), color(color.black))
      GUIDE: text.title( label( "Light Fog" ) )
      GUIDE: axis(dim(2), label("Mean"))
      GUIDE: legend(aesthetic(aesthetic.color.interior), label("Critical Event 1: Automated Condition"))
      GUIDE: text.footnote(label("Error Bars: +/- 2 SE"))
      SCALE: cat(dim(1), include("0", "1", "2", "3", "4", "5", "6", "7", "8"))
      SCALE: linear(dim(2), include(0), max(20))
      SCALE: cat(aesthetic(aesthetic.color.interior), include("0", "1"))
      ELEMENT: line(position(INDEX*SUMMARY), color.interior(LaneChange_Auto_2), missing.wings())
      ELEMENT: interval(position(region.spread.range(INDEX*(LOW+HIGH))), shape.interior(shape.ibeam), color.interior(LaneChange_Auto_2))
    END GPL.
    

    谢谢!

0 个答案:

没有答案