Topic
  • 2 replies
  • Latest Post - ‏2012-12-13T13:49:12Z by SystemAdmin
Dynamo76
Dynamo76
25 Posts

Pinned topic Multiple stacked bar chart in same graph (ppt)

‏2012-12-13T06:34:45Z |
Hi,

How can I create multiple stacked bar charts in same gpl ggraph command?
I try to but 10 stacked bar charts in same powerpoint slide.

BR,
Dynamo76
Updated on 2012-12-13T13:49:12Z at 2012-12-13T13:49:12Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    266 Posts

    Re: Multiple stacked bar chart in same graph (ppt)

    ‏2012-12-13T13:37:56Z  
    As stated I can not make any sense out of this question. Please elaborate, give an example of what you want the end product to look like etc.

    Andy W
    http://andrewpwheeler.wordpress.com
  • SystemAdmin
    SystemAdmin
    266 Posts

    Re: Multiple stacked bar chart in same graph (ppt)

    ‏2012-12-13T13:49:12Z  
    You might consider using paneling if the charts represent a partition of the data. Otherwise you can use the GPL GRAPH statement to divide up the space and put separate charts in each one. See the GPL help for details. Here is an example.
    
    GGRAPH /GRAPHDATASET NAME=
    "graphdataset" VARIABLES= salary jobtime educ /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id(
    "graphdataset") ) DATA: salary = col(source(s), name(
    "salary") ) GRAPH: begin(origin(15.0%, 0%), scale(42.5%, 75%)) SCALE: linear(dim(2), include(0)) DATA: educ = col(source(s), name(
    "educ") , unit.category()) GUIDE: axis(dim(1), label(
    "Educational Level (years)") ) GUIDE: axis(dim(2), label(
    "Current Salary") ) ELEMENT: interval(position(summary.mean(educ * salary))) GRAPH: end() GRAPH: begin(origin(57.5%, 0%), scale(42.5%, 75%)) DATA: jobtime = col(source(s), name(
    "jobtime") ) GUIDE: axis(dim(1), label(
    "Months since Hire") ) GUIDE: axis(dim(2), 
    
    null()) ELEMENT: point(position(jobtime * salary) ) GRAPH: end() END GPL.
    

    It takes some experimentation to get the layout right, because the percentages don't account for the labelling.

    HTH,
    Jon Peck