GPL question

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

GPL question

Maguin, Eugene

I think this has been discussed before by Andy but I don’t know what the search terms would be.

What I’d like to do is to make multiple plots on a single physical page. For problem visualization, the plots are response variable by time with a regression line, one plot per person as for data screening for a growth curve model. I’m thinking that on a landscape page, perhaps six plots might be about right. The problem is how to control plot placement and plot size on the page. Assuming there is no interaction between size/placement and plot contents, I don’t need help with the plot content as there is an example in the documentation. I’m assuming that GPL must be used because legacy commands can’t control size/placement.

Thanks, Gene Maguin

 

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: GPL question

Robert L

Hi Gene,

 

This might be too simple, but have you tried the Groups/Points ID tab on Chart Builder? This would as far as I can see require a “long” structure in your dataset, but with two categorical variables defining the plots in your matrix, you should be able to organize the plots as intended. As for plot size, it could possibly be done with either GPL commands and/or settings in a template (options made available in the Chart Editor, see File/Save Chart Template).

 

Robert

 

Från: SPSSX(r) Discussion [mailto:[hidden email]] För Maguin, Eugene
Skickat: den 9 september 2016 16:33
Till: [hidden email]
Ämne: GPL question

 

I think this has been discussed before by Andy but I don’t know what the search terms would be.

What I’d like to do is to make multiple plots on a single physical page. For problem visualization, the plots are response variable by time with a regression line, one plot per person as for data screening for a growth curve model. I’m thinking that on a landscape page, perhaps six plots might be about right. The problem is how to control plot placement and plot size on the page. Assuming there is no interaction between size/placement and plot contents, I don’t need help with the plot content as there is an example in the documentation. I’m assuming that GPL must be used because legacy commands can’t control size/placement.

Thanks, Gene Maguin

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Robert Lundqvist
Reply | Threaded
Open this post in threaded view
|

Re: GPL question

Andy W
In reply to this post by Maguin, Eugene
I'm not 100% sure what you are asking. Do the "PAGE:begin" and "PAGE: end()" command in inline GPL do what you are looking for? (They make the chart take out more or less space in the output.)

See the last small multiple chart in https://andrewpwheeler.wordpress.com/2016/08/12/plotting-panel-data-with-many-lines-in-spss/ for an example of using them to make a chart larger.
Andy W
apwheele@gmail.com
http://andrewpwheeler.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

Re: GPL question

Maguin, Eugene
Andy
What I was asking for is what you reference below. I looked at your website link from your reply "How to modify ..." and found the cited post. I'll look the code over and try to adapt it. Without reading the documentation, I'm guessing the key elements are PAGE and COORD commands. I see the note about manual editing. Would you comment on that please, were the county plots written by default to the spv file as 9 per row or did you "edit" them somehow to get 9 per row?
(I also saw the graph that you did on Buffalo roadblocks. Very nice. Instructive about where they are not. May I ask if you did that for either Artvoice or Public.)

Gene Maguin


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Andy W
Sent: Friday, September 09, 2016 11:37 AM
To: [hidden email]
Subject: Re: GPL question

I'm not 100% sure what you are asking. Do the "PAGE:begin" and "PAGE: end()"
command in inline GPL do what you are looking for? (They make the chart take out more or less space in the output.)

See the last small multiple chart in
https://andrewpwheeler.wordpress.com/2016/08/12/plotting-panel-data-with-many-lines-in-spss/
for an example of using them to make a chart larger.



-----
Andy W
[hidden email]
http://andrewpwheeler.wordpress.com/
--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/GPL-question-tp5733098p5733101.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: GPL question

Jon Peck
In reply to this post by Maguin, Eugene
Neither of these does exactly what you want, but you might find that the Graphs > Compare Subgroups (STATS SUBGROUP PLOTS) extension command or Graphs > Regression Variable Plots (STATS REGRESS PLOT) useful.  Both extensions just generate and run the requisite GPL code.  If you look at the generated code in the Notes table of the generated GGraph block in the Viewer, you can see how the PAGE and related GPL commands are used to arrange multiple plots together.

Or maybe just the paneling options in the Chart Builder would be sufficient.

On Fri, Sep 9, 2016 at 8:33 AM, Maguin, Eugene <[hidden email]> wrote:

I think this has been discussed before by Andy but I don’t know what the search terms would be.

What I’d like to do is to make multiple plots on a single physical page. For problem visualization, the plots are response variable by time with a regression line, one plot per person as for data screening for a growth curve model. I’m thinking that on a landscape page, perhaps six plots might be about right. The problem is how to control plot placement and plot size on the page. Assuming there is no interaction between size/placement and plot contents, I don’t need help with the plot content as there is an example in the documentation. I’m assuming that GPL must be used because legacy commands can’t control size/placement.

Thanks, Gene Maguin

 

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD



--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: GPL question

Andy W
In reply to this post by Maguin, Eugene
The manual editing was because of the titles for the panels were too small. IIRC making the spacing between the panels just a bit smaller fixed that problem and SPSS automatically resized. That may be because of my chart template I use though (and could probably be fixed with a chart template or slightly altering the size of the chart in the PAGE command).

The PAGE command makes the physical plot bigger. So if you had a single scatterplot you could make it take up a whole page in landscape mode.

The COORD in that example is used to wrap the small multiple plots. By default you need to panel either in columns or rows. the "wrap()" option makes it go in a grid. I use it often when there are many panels.

As for the Buffalo study, my coauthor is the one from Buffalo, and no we did not advertise in any of the local outlets. (It is under review as a journal article at the moment.) There was some critical commentary of the roadblocks themselves though in City and State, http://cityandstateny.com/articles/politics/new-york-state-articles/checkpoint-buffalo-are-the-bpd%E2%80%99s-traffic-stops-unconstitutional.html#.V9QTipgrK01.

Andy W
apwheele@gmail.com
http://andrewpwheeler.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

Re: GPL question

Maguin, Eugene
Using (and adapting) your syntax, I can produce a page of plots. Thank you so much. I have 48 plots to make and eight per landscape page is about right. Question now is how to make those six pages of plots. Is it simply a matter of repeating a chunk of syntax six times or is something else possible? The chunk I refer to is this:

Temp.
Select if block eq 1.
Graphspec ...
Begin gpl ... end gpl.

Repeat once each for blocks 2 thru 6.

As I read the manual, I assume I can't sequence through blocks inside the graphspec command. Am I wrong?

Thanks, Gene Maguin

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: GPL question

Andy W
I'm pretty sure you would need to repeat the GGRAPH syntax 6 times. Any one GGRAPH command is not going to be split across separate pages when exporting.
Andy W
apwheele@gmail.com
http://andrewpwheeler.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

Re: GPL question

Jon Peck
The question is how to repeat (other than carpel tunnel copy and paste).  GPL and macro do not get along, but embedding in Python code would work.

On Wed, Sep 14, 2016 at 6:28 AM, Andy W <[hidden email]> wrote:
I'm pretty sure you would need to repeat the GGRAPH syntax 6 times. Any one
GGRAPH command is not going to be split across separate pages when
exporting.



-----
Andy W
[hidden email]
http://andrewpwheeler.wordpress.com/
--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/GPL-question-tp5733098p5733135.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD



--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD