GGRAPH

GGRAPH generates a graph by computing statistics from variables in a data source and constructing the graph according to the graph specification, which may be written in the Graphics Productions Language (GPL) or ViZml.

Note: Square brackets used in the GGRAPH syntax chart are required parts of the syntax and are not used to indicate optional elements. Any equals signs (=) displayed in the syntax chart are required. The GRAPHSPEC subcommand is required.

GGRAPH

  /GRAPHDATASET NAME="name"

                DATASET=datasetname

                VARIABLES=variablespec

                TRANSFORM={NO**                                         }
                          {VARSTOCASES(SUMMARY="varname" INDEX="varname")}

                MISSING={LISTWISE**    } REPORTMISSING={NO**}
                        {VARIABLEWISE  }               {YES }

                CASELIMIT={1000000**}
                          {value    }

  /GRAPHSPEC  SOURCE={INLINE                                                              }
                     {GPLFILE("filespec")                                                 }
                     {VIZMLFILE("filespec")                                               }
                     {VIZTEMPLATE(NAME={"template name"}[LOCATION={LOCAL**                }]}
                                                                  {"repository folderspec"}
                                       {"filespec"     }          {FILE                   }
                                  MAPPING(templatemapping))

              EDITABLE={YES**}
                       {NO   }

              LABEL="string"

              DEFAULTTEMPLATE={YES**} TEMPLATE=["filespec" ...]
                              {NO   }

              VIZSTYLESHEET="stylesheet name"[LOCATION={LOCAL**                }]
                                                       {"repository folderspec"}

              VIZMAP={"map name"}[LOCATION={LOCAL**                }
                                           {"repository folderspec"}
                     {"filespec"}          {FILE                   }
                                  TYPE={DATA**   } MAPKEY="attribute label"
                                       {REFERENCE}
                                  SHOWALLFEATURES={YES**}
                                                  {NO   }]

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Release History

Release 14.0

  • Command introduced.

Release 15.0

  • RENAME syntax qualifier deprecated.
  • COUNTCI, MEDIANCI, MEANCI, MEANSD, and MEANSE functions introduced.

Release 17.0

  • Added SOURCE=VIZTEMPLATE to support visualization templates.
  • Added VIZSTYLESHEET keyword to support visualization stylesheets.

Release 19.0

  • Added LOCATION=FILE to support visualization templates stored in an arbitrary location on the file system.

Release 20.0

  • Added VIZMAP keyword to support map visualizations.

Examples

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat COUNT()
  /GRAPHSPEC SOURCE=GPLFILE("simplebarchart.gpl").
GGRAPH 
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat COUNT()
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: jobcat=col(source(s), name("jobcat"), unit.category())
  DATA: count=col(source(s), name("COUNT"))
  GUIDE: axis(dim(1), label("Employment Category"))
  GUIDE: axis(dim(2), label("Count"))
  ELEMENT: interval(position(jobcat*count))
END GPL.
GGRAPH 
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat
  /GRAPHSPEC SOURCE=VIZTEMPLATE(NAME="Bar"
                                MAPPING("Categories"="jobcat" "Summary"="Count"))
   DEFAULTTEMPLATE=NO.