question about formatting values in gpl

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

question about formatting values in gpl

Wells, Christine

Greetings,

 

I am writing some ggraph/gpl code and I was wondering how to format the values of the axis labels.  For example, by default, the values on the y-axis are 4.00, 5.00, 6.00, etc.  I would rather have 4, 5, 6.  Does anyone know the gpl syntax to do this?  I know how to do this with the graph editor once I make the graph, but I would really rather include this in my syntax.

 

Here is my syntax so far:

 

GGRAPH

  /GRAPHDATASET NAME="graphdataset" VARIABLES=meanses ebintrcp

  /GRAPHSPEC SOURCE=INLINE.

BEGIN GPL

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

  DATA: meanses=col(source(s), name("meanses"))

  DATA: ebintrcp=col(source(s), name("ebintrcp"))

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

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

SCALE: linear( dim( 1 ), min(-1.5), max(1) )

SCALE: linear( dim( 2 ), min(-4), max(6) )

  ELEMENT: point(position(meanses*ebintrcp))

END GPL.

 

Thank you for any assistance!

 

Best,

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

 

Reply | Threaded
Open this post in threaded view
|

Re: question about formatting values in gpl

ViAnn Beadle

Generally speaking, GPL formats scalar values using the print format defined for them. So what is the format of variables meanses?

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Wells, Christine
Sent: Wednesday, September 30, 2009 12:15 PM
To: [hidden email]
Subject: question about formatting values in gpl

 

Greetings,

 

I am writing some ggraph/gpl code and I was wondering how to format the values of the axis labels.  For example, by default, the values on the y-axis are 4.00, 5.00, 6.00, etc.  I would rather have 4, 5, 6.  Does anyone know the gpl syntax to do this?  I know how to do this with the graph editor once I make the graph, but I would really rather include this in my syntax.

 

Here is my syntax so far:

 

GGRAPH

  /GRAPHDATASET NAME="graphdataset" VARIABLES=meanses ebintrcp

  /GRAPHSPEC SOURCE=INLINE.

BEGIN GPL

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

  DATA: meanses=col(source(s), name("meanses"))

  DATA: ebintrcp=col(source(s), name("ebintrcp"))

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

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

SCALE: linear( dim( 1 ), min(-1.5), max(1) )

SCALE: linear( dim( 2 ), min(-4), max(6) )

  ELEMENT: point(position(meanses*ebintrcp))

END GPL.

 

Thank you for any assistance!

 

Best,

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

 

Reply | Threaded
Open this post in threaded view
|

Re: question about formatting values in gpl

Wells, Christine

Thank you – just the tip that I needed!

 

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

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of ViAnn Beadle
Sent: Wednesday, September 30, 2009 11:46 AM
To: [hidden email]
Subject: Re: question about formatting values in gpl

 

Generally speaking, GPL formats scalar values using the print format defined for them. So what is the format of variables meanses?

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Wells, Christine
Sent: Wednesday, September 30, 2009 12:15 PM
To: [hidden email]
Subject: question about formatting values in gpl

 

Greetings,

 

I am writing some ggraph/gpl code and I was wondering how to format the values of the axis labels.  For example, by default, the values on the y-axis are 4.00, 5.00, 6.00, etc.  I would rather have 4, 5, 6.  Does anyone know the gpl syntax to do this?  I know how to do this with the graph editor once I make the graph, but I would really rather include this in my syntax.

 

Here is my syntax so far:

 

GGRAPH

  /GRAPHDATASET NAME="graphdataset" VARIABLES=meanses ebintrcp

  /GRAPHSPEC SOURCE=INLINE.

BEGIN GPL

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

  DATA: meanses=col(source(s), name("meanses"))

  DATA: ebintrcp=col(source(s), name("ebintrcp"))

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

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

SCALE: linear( dim( 1 ), min(-1.5), max(1) )

SCALE: linear( dim( 2 ), min(-4), max(6) )

  ELEMENT: point(position(meanses*ebintrcp))

END GPL.

 

Thank you for any assistance!

 

Best,

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