• axis change and merging panels for Graph command (NOT GPL)

    From ecottrellmartin@gmail.com@21:1/5 to All on Wed Aug 28 09:51:52 2019
    I am working with the following syntax:

    GRAPH
    /LINE(MULTIPLE)=MEAN(DRS_Score) BY data_point BY PRE_LTCH
    /PANEL ROWVAR=Sex_AA2 ROWOP=CROSS.

    I would like to change the axis scale (it's currently .5 to 3.5 because it's plotting means, I would like it to be the full 0 to 14 scale.

    I also wondering if it's possible in SPSS to show both of the panels on one graph (right now there's 2 panels, one for male and one for female, with 3 lines on each graph for the three locations. My boss wants all six lines on one graph).


    I'd like to stick with GRAPH because we eventually want to make a macro or loop with it to go through all our variables, and from what I've read you can't do that with GPL unless you use python which is outside our wheelhouse.

    Thank you.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bruce Weaver@21:1/5 to ecottre...@gmail.com on Wed Aug 28 11:04:31 2019
    On Wednesday, August 28, 2019 at 12:51:54 PM UTC-4, ecottre...@gmail.com wrote:
    I am working with the following syntax:

    GRAPH
    /LINE(MULTIPLE)=MEAN(DRS_Score) BY data_point BY PRE_LTCH
    /PANEL ROWVAR=Sex_AA2 ROWOP=CROSS.

    I would like to change the axis scale (it's currently .5 to 3.5 because it's plotting means, I would like it to be the full 0 to 14 scale.

    I also wondering if it's possible in SPSS to show both of the panels on one graph (right now there's 2 panels, one for male and one for female, with 3 lines on each graph for the three locations. My boss wants all six lines on one graph).


    I'd like to stick with GRAPH because we eventually want to make a macro or loop with it to go through all our variables, and from what I've read you can't do that with GPL unless you use python which is outside our wheelhouse.

    Thank you.

    Am I correct in thinking that you want to substitute a different variable for DRS_Score on each pass through the loop? If so, do you want the Y-axis scale to be 0 to 14 each time, or will that depend on which variable you have?

    As for changing the Y-axis scale via syntax, you ~may~ be able to do it via the TEMPLATE subcommand for GRAPH (https://www.ibm.com/support/knowledgecenter/en/SSLVMB_26.0.0/statistics_reference_project_ddita/spss/base/syn_graph_template.html).

    As you know, you can control the Y-axis range via GGRAPH. To avoid the problem with looping macros, another approach you could try is restructuring the dataset from WIDE to LONG with all of the Y-values you want to plot in a single variable with another
    index variable telling you which Y-variable it is on each row. With that LONG file format, you could SPLIT FILE on the index variable before running your GGRAPH command. (Again, this assumes that you want the same 0-14 range for each Y-variable.)

    Finally, you might consider posting to the SPSSX-L forum, which gets a lot more traffic these days than this usenet group does. One of the regular posters to that forum (Andy W) is very knowledgeable about GGRAPH, and may be able to help.

    http://spssx-discussion.1045642.n5.nabble.com/

    HTH.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)