SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 

 View Only
  • 1.  GPL Histogram: Ticks and (no) decimals

    Posted Sun February 26, 2023 03:59 PM
    In the Histogram below, I'd like to have vertical axis values without the decimals.
    I'd also like to add tick marks to the horizontal axis, preferably pointing downwards.
    Is there a syntax/GPL approach to achieve this? 
    (I'm afraid I might be missing the obvious, as e.g. Fig. 399 in the GPL Reference Manual has both.)


    TEMPORARY.
    FORMATS
      all_pred_hebel (F8.2).
    GGRAPH
    /GRAPHDATASET
        NAME = "graphdataset"
        VARIABLES = all_pred_hebel [name="hebelvar"]
        MISSING = LISTWISE 
        REPORTMISSING = NO
    /GRAPHSPEC
        SOURCE = INLINE.
    BEGIN GPL
        SOURCE: s = userSource(id("graphdataset"))
        DATA: hebelvar = col(source(s), name("hebelvar"))
        GUIDE: axis(dim(1), delta (.01), label("Zentr. Hebelwert all_pred"))
        GUIDE: axis(dim(2), label("Häufigkeit"))
        GUIDE: text.title(label("[H1.1] Zentrierter Hebelwert"))
        GUIDE: text.subsubtitle(label("Cut-Off: 0.0215 = 2 × 5 ÷ 466"))
        GUIDE: form.line(position(0.02145922746781116, *), color(color.orangered), size(size."1px"), shape(shape.solid), label("0.0215"))
        ELEMENT: interval(position(summary.count(bin.rect(hebelvar, binWidth(0.001)))),color(color.limegreen), color.exterior(color.white), shape.interior(shape.square))
    END GPL.



  • 2.  RE: GPL Histogram: Ticks and (no) decimals

    Posted Sun February 26, 2023 05:28 PM
    Create a histogram.  Edit it in the Chart Editor and change the decimals for the y axis to zero and add the ticks to the x axis.

    Then save this as a template from the Chart Editor, selecting the properties that should be included.  You can then specify this template in GGRAPH or the Chart Builder to get these settings.

    --