SPSS Statistics

 View Only
  • 1.  Legacy graphs: problem applying chart template

    Posted Tue May 30, 2023 01:25 PM
    Edited by Frank Furter Tue May 30, 2023 01:25 PM

    I use the legacy chart engine mainly because they can be conveniently generated from command syntax which can be easily integrated into SPSS macro code. Unfortunately, I have been noticing for several versions of SPSS that some of the chart properties saved with a template are systematically not honored when the template is applied to a new chart of the same type. Attached is a particularly blatant example of what I mean. The first chart in the Viewer file was generated from the included syntax, customized in the chart editor, and then saved as a template (saving all of the chart's settings). The second chart was then generated using the same syntax but applying the template, which is also attached to this post. As you can see, none of the custom setting were honored (the new chart is generated as if no template were applied - everyone is welcome to try and apply the template manually in the chart editor).

    As I have written above, this is a particularly blatant example. In most cases, some customized settings saved in a template are honored while others are ignored.

    I am currently using SPSS 29.0.1 on a PC running Windows 10 Pro 64-bit. As already mentioned, this has however, been around for several versions of SPSS and on other Windows machines that I have used.

    Any help on how to get the templates working reliably is appreciated.



    ------------------------------
    Frank Furter
    ------------------------------



  • 2.  RE: Legacy graphs: problem applying chart template

    Posted Wed May 31, 2023 10:13 AM

    Hi @Frank Furter 

    I don't see any attachments to this post.  If you could supply the syntax, template, and problem description as above, I can log a defect against this behavior.  This is probably easier to work if you open a Support case here. Plus, with a Support case, you will be notified when this issue is resolved in a future release or fix.



    ------------------------------
    David Dwyer
    SPSS Technical Support
    IBM Software
    ------------------------------



  • 3.  RE: Legacy graphs: problem applying chart template

    Posted Wed May 31, 2023 10:35 AM
      |   view attached

    Hi @David Dwyer

    when I click on your link and then 'Open a case' after logging in, I receive an error message 'The page you requested cannot be displayed. 503: Service Unavailable'.
    I've just noticed that .spv and .sgt files are not supported for upload to this forum (why?) - this is pronbably why the uploade failed initially. Please find them now included in a Zip file.



    ------------------------------
    Frank Furter
    ------------------------------

    Attachment(s)

    zip
    Chart_Template_Issue.zip   14 KB 1 version


  • 4.  RE: Legacy graphs: problem applying chart template

    Posted Thu June 01, 2023 11:10 AM
      |   view attached

    Hi @Frank Furter 
    - I don't know what to say about your issues accessing the URL.  How about the main Support Portal then follow the tile for opening a case?
    This tile is on the "Getting Started" tab.  Of course, if you have not purchased Support, then the point is moot.

    • I looked at the XML underlying your Template and it seems like you have added a Reference Line in addition to a Fit Line with confidence intervals.  The presence of that Reference Line seems to be suppressing the rest of the template. I commented it out and the rest of your template seemed to run.
    • I note too that this is a version 1.4 template rather than a version 3.0 template.  In your initial description, you talk about using the Legacy Chart Engine (the one associated with the "Legacy" GRAPH command syntax).  GRAPH has been aliased to the GGRAPH command.  So in actuality, you are using the same engine regardless of the chart type you choose.  There may well be limitations in the "Legacy" graphs due to only porting over the functionality available to them under GRAPH.  In any case, transitioning away from the "Legacy" graphs will give you more control over the result.
    • I've included an example here with sample data, using your template (minus the data-specific Reference Line) under both GRAPH and GGRAPH manifestations of a Scatterplot.  I hope this helps.


    ------------------------------
    David Dwyer
    SPSS Technical Support
    IBM Software
    ------------------------------

    Attachment(s)

    zip
    FitLine_NoRefLine.zip   16 KB 1 version


  • 5.  RE: Legacy graphs: problem applying chart template

    Posted Thu June 01, 2023 12:02 PM

    Hi David,

    thank you so much, this is interesting in several regards:

    • Your template works fine, thank you very much :)
    • My template was created by editing a chart in SPSS 29 and then saving the template file from the chart editor. No reference line was has ever been added to this chart before saving the template. Indeed, I do have several older templates on my machine, and I may have generated some other chart types (line and error bar charts) during the same SPSS session that have included reference lines - but definitely not in this chart. How come that the template file includes the reference line nevertheless, and that it is version 1.4 instead of 3.0 even though it was saved as a new template file in SPSS 29 - and how can I avoid this?
    • Even though my template was an older file version and a reference line was included in the template for whatever reason, this should not prevent SPSS from applying the 'rest' of the template. At the very least, a warning should be issued that the template cannot be applied. I would consider the present behavior of SPSS buggy in this regard.
    • The reason for using 'legacy' graph command syntax is that the code is a part of a macro where variable names are assigned using macro variables. To the best of my knowledge, GGraph + Begin / End GPL does not work inside macros (this is a high-priority feature request on my personal SPSS wish list).

    Regarding SPSS support, I have purchased the software from a reseller in Austria, which includes (their) support. It appears that this does not qualify me for support through the IBM web site (even though I have an IBM ID), right?



    ------------------------------
    Frank Furter
    ------------------------------



  • 6.  RE: Legacy graphs: problem applying chart template

    Posted Thu June 01, 2023 12:35 PM

    Hi Frank,

    • I'm glad the edited template works
    • Was the chart you started with before saving the latest template itself created using a template? In my experience, the best way to create a chart template is to start from a default graph and then only save the properties that you have changed.
    • I agree, the Chart Editor can become quite complex (and frustrating). Certainly checking the "All" box has never been a good idea, as it doesn't overwrite attributes you didn't actually change.  Nor does it add/remove attributes from previous templates.  Often the best course is to create a minimalist template that only includes the pieces you want to alter from the default.  Many many defects and enhancements have been filed and dealt with over the years.  The true solution likely rests in a complete re-design of this functionality.
    • Agreed, the SPSS Macro Facility (DEFINE -- !ENDDEFINE) has not had significant Development since SPSS 6.1.4 for Windows.  It has been largely deprecated in favor of Python since SPSS 14.0.  It certainly would not have kept pace with procedures that have since been themselves deprecated -- In this case, the migration of GRAPH to GGRAPH.
    • You are right, if you have purchased Support from your local reseller, then they would be the ones providing you direct Support.



    ------------------------------
    David Dwyer
    SPSS Technical Support
    IBM Software
    ------------------------------



  • 7.  RE: Legacy graphs: problem applying chart template

    Posted Thu June 01, 2023 12:49 PM

    Hi David,

    when I start a new session of SPSS 29 with no template file defined on the Charts tab of the Options dialog, does this assure that all chart settings are at their default with no template options in place?

    My (and many others') use of SPSS command syntax in 'larger' projects rests firmly on the use of the SPSS Macro Facility. Hopefully this feature will never be deprecated; otherwise I would have to start my macro library all over again. So far, I have not had any compatibility issues except with GGraph.

    I remember SPSS 6.1.4 quite well (I started using SPDSS with punch cards on a mainframe ...). As a matter of fact, I still keep a backup copy of 6.1.4 - you never know ... ;)



    ------------------------------
    Frank Furter
    ------------------------------



  • 8.  RE: Legacy graphs: problem applying chart template

    Posted Thu June 01, 2023 01:28 PM

    Hi Frank,
    Yes, I think that would do it.  Then I'd take my time changing attributes and saving the template.  Testing the saved template as I go.  If something goes wrong, fix the last thing added before making more changes and updating the Template file.

    It has been my fervent hope since we introduced support for Python Programability in SPSS 14.0 or Unicode support in SPSS 16.0, that users would adopt these changes and begin their migrations earlier rather than later. I agree, the Macro Facility will likely never be removed.  Neither is it likely to get any further development.



    ------------------------------
    David Dwyer
    SPSS Technical Support
    IBM Software
    ------------------------------