GPL/ViZml object size

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

GPL/ViZml object size

Haubrich, Matthew [DOT]

I’m having trouble with GPL/ViZml in SPSS 19.0.0.1.  I would like to produce a series of different graphs, each one sized to print landscape on legal-size paper.  I’m having trouble understanding the GPL/ViZml syntax well enough to see how to set the size of each graph.  I have the GPL manual from IBM, and it looks like maybe I need to use a “PAGE” statement(???), but that’s about as far as I’ve been able to get.  Anyone have experience with GPL/ViZml?

 

Thanks!

 

+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+

Matt Haubrich

Asset Manager / Performance Measurement Administrator

Office of Maintenance

Iowa Department of Transportation

Reply | Threaded
Open this post in threaded view
|

Re: GPL/ViZml object size

Jon K Peck
Here is an example of using the page directive in your GPL.  I omitted the GGRAPH part.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset") )
PAGE: begin(scale(5.0in, 4.0in))
<chart specifications>
PAGE: end()
END GPL.

HTH,
Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From:        "Haubrich, Matthew [DOT]" <[hidden email]>
To:        [hidden email]
Date:        02/06/2012 01:32 PM
Subject:        [SPSSX-L] GPL/ViZml object size
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




I’m having trouble with GPL/ViZml in SPSS 19.0.0.1.  I would like to produce a series of different graphs, each one sized to print landscape on legal-size paper.  I’m having trouble understanding the GPL/ViZml syntax well enough to see how to set the size of each graph.  I have the GPL manual from IBM, and it looks like maybe I need to use a “PAGE” statement(???), but that’s about as far as I’ve been able to get.  Anyone have experience with GPL/ViZml?
 
Thanks!
 
+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+
Matt Haubrich
Asset Manager / Performance Measurement Administrator
Office of Maintenance
Iowa Department of Transportation
Reply | Threaded
Open this post in threaded view
|

Re: GPL/ViZml object size

ViAnn Beadle
In reply to this post by Haubrich, Matthew [DOT]

Use the PAGE function to define the size. You’ll need a PAGE: begin() before the statements that define the chart (SCALE, ELEMENT, …) and a PAGE:end() just before the END GPL command. Use the scale function with two arguments corresponding to x and y. Here’s a simple example with the statements inserted into syntax generated from chart builder:

 

GGRAPH

  /GRAPHDATASET NAME="graphdataset" VARIABLES=region COUNT()[name="COUNT"] MISSING=LISTWISE

    REPORTMISSING=NO

  /GRAPHSPEC SOURCE=INLINE.

BEGIN GPL

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

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

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

  PAGE: begin(scale(10in,8in))

  GUIDE: axis(dim(1), label("Region of the United States"))

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

  SCALE: cat(dim(1), include("1.00", "2.00", "3.00"))

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

  ELEMENT: interval(position(region*COUNT), shape.interior(shape.square))

  PAGE: end()

END GPL.

 

You’ll have to experiment to fit the chart precisely. You’ve also got to account for your page setup (orientation and margins), and exactly what parts of the output you want to print (chart, headers, footers, etc), and your printer. Use the File>Print Preview command to see how it looks. You can also take the chart into the chart editor and change the chart size to experiment. Then use those numbers as arguments to the scale function.

 

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Haubrich, Matthew [DOT]
Sent: Monday, February 06, 2012 1:28 PM
To: [hidden email]
Subject: GPL/ViZml object size

 

I’m having trouble with GPL/ViZml in SPSS 19.0.0.1.  I would like to produce a series of different graphs, each one sized to print landscape on legal-size paper.  I’m having trouble understanding the GPL/ViZml syntax well enough to see how to set the size of each graph.  I have the GPL manual from IBM, and it looks like maybe I need to use a “PAGE” statement(???), but that’s about as far as I’ve been able to get.  Anyone have experience with GPL/ViZml?

 

Thanks!

 

+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+

Matt Haubrich

Asset Manager / Performance Measurement Administrator

Office of Maintenance

Iowa Department of Transportation

Reply | Threaded
Open this post in threaded view
|

Re: GPL/ViZml object size

Haubrich, Matthew [DOT]

Thank-you!

 

I’m now getting the pages to come out at a size that will work, except for any chart with a legend.  Charts without a legend are coming out at the expected aspect ratio and size, however when I have a legend it appears (based on what I see in the chart editor) that the legend it taking up a lot more space than it really needs (horizontally).  I’ve been beating my head against the wall (not literally) trying to figure out how to reduce the size of the legend or to make the chart relatively larger, but so far no luck.  Do I need a “GRAPH” statement to do that?  Or is there some control in the GUIDE: legend() statement that makes the legend better-behaved?

 

Thanks,

Matt

 

+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+

Matt Haubrich

Asset Manager / Performance Measurement Administrator

Office of Maintenance

Iowa Department of Transportation

 

From: ViAnn Beadle [mailto:[hidden email]]
Sent: Monday, February 06, 2012 3:08 PM
To: Haubrich, Matthew [DOT]; [hidden email]
Subject: RE: GPL/ViZml object size

 

Use the PAGE function to define the size. You’ll need a PAGE: begin() before the statements that define the chart (SCALE, ELEMENT, …) and a PAGE:end() just before the END GPL command. Use the scale function with two arguments corresponding to x and y. Here’s a simple example with the statements inserted into syntax generated from chart builder:

 

GGRAPH

  /GRAPHDATASET NAME="graphdataset" VARIABLES=region COUNT()[name="COUNT"] MISSING=LISTWISE

    REPORTMISSING=NO

  /GRAPHSPEC SOURCE=INLINE.

BEGIN GPL

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

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

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

  PAGE: begin(scale(10in,8in))

  GUIDE: axis(dim(1), label("Region of the United States"))

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

  SCALE: cat(dim(1), include("1.00", "2.00", "3.00"))

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

  ELEMENT: interval(position(region*COUNT), shape.interior(shape.square))

  PAGE: end()

END GPL.

 

You’ll have to experiment to fit the chart precisely. You’ve also got to account for your page setup (orientation and margins), and exactly what parts of the output you want to print (chart, headers, footers, etc), and your printer. Use the File>Print Preview command to see how it looks. You can also take the chart into the chart editor and change the chart size to experiment. Then use those numbers as arguments to the scale function.

 

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Haubrich, Matthew [DOT]
Sent: Monday, February 06, 2012 1:28 PM
To: [hidden email]
Subject: GPL/ViZml object size

 

I’m having trouble with GPL/ViZml in SPSS 19.0.0.1.  I would like to produce a series of different graphs, each one sized to print landscape on legal-size paper.  I’m having trouble understanding the GPL/ViZml syntax well enough to see how to set the size of each graph.  I have the GPL manual from IBM, and it looks like maybe I need to use a “PAGE” statement(???), but that’s about as far as I’ve been able to get.  Anyone have experience with GPL/ViZml?

 

Thanks!

 

+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+

Matt Haubrich

Asset Manager / Performance Measurement Administrator

Office of Maintenance

Iowa Department of Transportation

Reply | Threaded
Open this post in threaded view
|

Re: GPL/ViZml object size

ViAnn Beadle

What happens when you edit one a chart with a very wide margin on the legend in the chart editor. Can you resize it? Can you send me (directly) an output file with an example to play with? It may be possible to override the space via a chart template. Generally speaking the chart render tends to allocate regions based on upon the general width provided. A template might be able to override this but it’s very fragile.

 

From: Haubrich, Matthew [DOT] [mailto:[hidden email]]
Sent: Monday, February 06, 2012 2:46 PM
To: 'ViAnn Beadle'; [hidden email]
Subject: RE: GPL/ViZml object size

 

Thank-you!

 

I’m now getting the pages to come out at a size that will work, except for any chart with a legend.  Charts without a legend are coming out at the expected aspect ratio and size, however when I have a legend it appears (based on what I see in the chart editor) that the legend it taking up a lot more space than it really needs (horizontally).  I’ve been beating my head against the wall (not literally) trying to figure out how to reduce the size of the legend or to make the chart relatively larger, but so far no luck.  Do I need a “GRAPH” statement to do that?  Or is there some control in the GUIDE: legend() statement that makes the legend better-behaved?

 

Thanks,

Matt

 

+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+

Matt Haubrich

Asset Manager / Performance Measurement Administrator

Office of Maintenance

Iowa Department of Transportation

 

From: ViAnn Beadle [hidden email]
Sent: Monday, February 06, 2012 3:08 PM
To: Haubrich, Matthew [DOT]; [hidden email]
Subject: RE: GPL/ViZml object size

 

Use the PAGE function to define the size. You’ll need a PAGE: begin() before the statements that define the chart (SCALE, ELEMENT, …) and a PAGE:end() just before the END GPL command. Use the scale function with two arguments corresponding to x and y. Here’s a simple example with the statements inserted into syntax generated from chart builder:

 

GGRAPH

  /GRAPHDATASET NAME="graphdataset" VARIABLES=region COUNT()[name="COUNT"] MISSING=LISTWISE

    REPORTMISSING=NO

  /GRAPHSPEC SOURCE=INLINE.

BEGIN GPL

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

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

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

  PAGE: begin(scale(10in,8in))

  GUIDE: axis(dim(1), label("Region of the United States"))

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

  SCALE: cat(dim(1), include("1.00", "2.00", "3.00"))

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

  ELEMENT: interval(position(region*COUNT), shape.interior(shape.square))

  PAGE: end()

END GPL.

 

You’ll have to experiment to fit the chart precisely. You’ve also got to account for your page setup (orientation and margins), and exactly what parts of the output you want to print (chart, headers, footers, etc), and your printer. Use the File>Print Preview command to see how it looks. You can also take the chart into the chart editor and change the chart size to experiment. Then use those numbers as arguments to the scale function.

 

 

 

From: SPSSX(r) Discussion [hidden email] On Behalf Of Haubrich, Matthew [DOT]
Sent: Monday, February 06, 2012 1:28 PM
To: [hidden email]
Subject: GPL/ViZml object size

 

I’m having trouble with GPL/ViZml in SPSS 19.0.0.1.  I would like to produce a series of different graphs, each one sized to print landscape on legal-size paper.  I’m having trouble understanding the GPL/ViZml syntax well enough to see how to set the size of each graph.  I have the GPL manual from IBM, and it looks like maybe I need to use a “PAGE” statement(???), but that’s about as far as I’ve been able to get.  Anyone have experience with GPL/ViZml?

 

Thanks!

 

+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+

Matt Haubrich

Asset Manager / Performance Measurement Administrator

Office of Maintenance

Iowa Department of Transportation