another ggraph/gpl question

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

another ggraph/gpl question

Wells, Christine

Greetings,

 

I am trying to make a 3D bar chart with two panels.  I had originally made this graph with igraph, and I have used the syntax converter to try to make the same graph using the ggraph command.  The graph made with ggraph has two problems:  I need the bars to have spaces between them, not overlapping as they are with the code below.  I also want the counts at the top of each bar.  The dataset and the desired graph can be found at  http://www.ats.ucla.edu/stat/spss/examples/alda/chapter9/aldaspssIIch1.htm

 

Thank you for any assistance that you can provide in making these changes to the graph.

 

 

format t (f2.0).

GGRAPH

  /GRAPHDATASET NAME="iGraphDataset" VARIABLES= t censor

  /GRAPHSPEC SOURCE=INLINE

      INLINETEMPLATE=

["<addBarEffects applyToNonBar='true' depth='100%' distance='1.4' foreshortening='0.2' theta='20' xscale='1' zLocation='0.5'/>"

 "<addDataLabels><labeling variable='percent'><format suffix='%'/></labeling></addDataLabels>" ].

BEGIN GPL

SOURCE: s=userSource( id( "iGraphDataset" ) )

DATA: Y_Var=col( source(s), name( "$count" ) )

DATA: X1_Var=col( source(s), name( "t" ), unit.category() )

DATA: Panel_Var0=col( source(s), name( "censor" ), unit.category() )

COORD: rect( dim( 1, 2 ) )

GUIDE: axis( dim( 1 ), label( "t" ) )

GUIDE: axis( dim( 2 ), label( "Count" ) )

GUIDE: axis( dim( 3 ), label( "censor" ), opposite() )

SCALE: linear( dim( 1 ) )

SCALE: linear( dim( 2 ), include( 0 ) )

ELEMENT: interval( position( summary.count( X1_Var * 1 * Panel_Var0 ) ), size( size."30pt" ) )

END GPL.

 

Best,

 

Christine Wells
Statistical Consulting Group
UCLA Academic Technology Services
http://www.ats.ucla.edu/stat/