Plotting questions

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

Plotting questions

Maguin, Eugene
I have several plotting questions. The whole purpose of this is to look at regression scatterplots for outlier values. So I want to see the scatterplot plus the regression line.

What I've got is 3 vars by 6 vars.
In graph, the command would be, for instance,

Graph scatterplot(matrix) x1 x2 y1 y2.

So that isn't quite what I'd like because it give me a 4x4 set of plots. It'd be much better if I could get a 2x2 plot set. I had thought that

Graph scatterplot(matrix) x1 x2 with y1 y2.

Would work, but no, it won't. But maybe I didn't know how to do things. Is there a way?

Oh, yeah, and I have to edit the plot to add the regression line. I think there is a command to add a regression line but I didn't see it documented. Is it? What is it?

It seems that spss has a fixed "frame" size (which is probably not the right word) for the plot itself, regardless of whether the plot is x1 with y1 or x1 x2 y1 y2. Oh, yes, I'll bet the answer is NO, but can the frame size manipulated? If you're screening scatterplots and you have, just saying, a 3 by 6 matrix of variables, it'd be oh so very nice to make the frame taller so the plots don't look like your little fingernail.

NOW, let's switch over to GGraph.
Courtesy of ViAnn and, I think, Marta, I can use ggraph to plot a 3x2 (x1 x2 x3 with y1 y2) and put regression lines on the plots although a database restructure is required.
Again the frame size question applies because I'd like to make the framesize taller to plot more than 3x2. So, can the frame size be manipulated in ggraph?

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: Plotting questions

Jon K Peck
Maybe the Graphs > Regression Variable Plots extension command (STATS REGRES PLOT) would do what you want.  It will give you a set of plots of one or more dependent variables against a list of predictors (categorical or continuous), and it can include various types of fit lines).

This command is in the Python Essentials for V21, but it can be downloaded from the SPSS Community site for earlier versions.


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




From:        "Maguin, Eugene" <[hidden email]>
To:        [hidden email],
Date:        02/08/2013 01:45 PM
Subject:        [SPSSX-L] Plotting questions
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




I have several plotting questions. The whole purpose of this is to look at regression scatterplots for outlier values. So I want to see the scatterplot plus the regression line.

What I've got is 3 vars by 6 vars.
In graph, the command would be, for instance,

Graph scatterplot(matrix) x1 x2 y1 y2.

So that isn't quite what I'd like because it give me a 4x4 set of plots. It'd be much better if I could get a 2x2 plot set. I had thought that

Graph scatterplot(matrix) x1 x2 with y1 y2.

Would work, but no, it won't. But maybe I didn't know how to do things. Is there a way?

Oh, yeah, and I have to edit the plot to add the regression line. I think there is a command to add a regression line but I didn't see it documented. Is it? What is it?

It seems that spss has a fixed "frame" size (which is probably not the right word) for the plot itself, regardless of whether the plot is x1 with y1 or x1 x2 y1 y2. Oh, yes, I'll bet the answer is NO, but can the frame size manipulated? If you're screening scatterplots and you have, just saying, a 3 by 6 matrix of variables, it'd be oh so very nice to make the frame taller so the plots don't look like your little fingernail.

NOW, let's switch over to GGraph.
Courtesy of ViAnn and, I think, Marta, I can use ggraph to plot a 3x2 (x1 x2 x3 with y1 y2) and put regression lines on the plots although a database restructure is required.
Again the frame size question applies because I'd like to make the framesize taller to plot more than 3x2. So, can the frame size be manipulated in ggraph?

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: Plotting questions

ViAnn Beadle

To get back to Gene’s original question, the frame size can be manipulated in ggraph via GPL.  You can use the scale() function on a GRAPH statement and a PAGE statement.  Scale takes either a percentage or a value specified in pixels, inches, or centimeters. 

 

I’m a bit confused about 2 x’s and 2 y’s and translating this into 3 vars by 6 vars and am not going to wrap my head around this right now. Note that you can layout multiple graphs within a “page” with the GRAPH: begin() function.

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Jon K Peck
Sent: Friday, February 08, 2013 1:51 PM
To: [hidden email]
Subject: Re: Plotting questions

 

Maybe the Graphs > Regression Variable Plots extension command (STATS REGRES PLOT) would do what you want.  It will give you a set of plots of one or more dependent variables against a list of predictors (categorical or continuous), and it can include various types of fit lines).

This command is in the Python Essentials for V21, but it can be downloaded from the SPSS Community site for earlier versions.


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




From:        "Maguin, Eugene" <[hidden email]>
To:        [hidden email],
Date:        02/08/2013 01:45 PM
Subject:        [SPSSX-L] Plotting questions
Sent by:        "SPSSX(r) Discussion" <[hidden email]>





I have several plotting questions. The whole purpose of this is to look at regression scatterplots for outlier values. So I want to see the scatterplot plus the regression line.

What I've got is 3 vars by 6 vars.
In graph, the command would be, for instance,

Graph scatterplot(matrix) x1 x2 y1 y2.

So that isn't quite what I'd like because it give me a 4x4 set of plots. It'd be much better if I could get a 2x2 plot set. I had thought that

Graph scatterplot(matrix) x1 x2 with y1 y2.

Would work, but no, it won't. But maybe I didn't know how to do things. Is there a way?

Oh, yeah, and I have to edit the plot to add the regression line. I think there is a command to add a regression line but I didn't see it documented. Is it? What is it?

It seems that spss has a fixed "frame" size (which is probably not the right word) for the plot itself, regardless of whether the plot is x1 with y1 or x1 x2 y1 y2. Oh, yes, I'll bet the answer is NO, but can the frame size manipulated? If you're screening scatterplots and you have, just saying, a 3 by 6 matrix of variables, it'd be oh so very nice to make the frame taller so the plots don't look like your little fingernail.

NOW, let's switch over to GGraph.
Courtesy of ViAnn and, I think, Marta, I can use ggraph to plot a 3x2 (x1 x2 x3 with y1 y2) and put regression lines on the plots although a database restructure is required.
Again the frame size question applies because I'd like to make the framesize taller to plot more than 3x2. So, can the frame size be manipulated in ggraph?

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: Plotting questions

Jon K Peck
The extension command I mentioned gives you control over the size as well as number of plots per row.  It has some other bells and whistles, too.  It does all this, by the way, by generating the GPL specifying all the plots.  If you look at that generated GPL, you will likely agree that you wouldn't want to write it by hand.



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




From:        ViAnn Beadle <[hidden email]>
To:        [hidden email],
Date:        02/08/2013 02:19 PM
Subject:        Re: [SPSSX-L] Plotting questions
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




To get back to Gene’s original question, the frame size can be manipulated in ggraph via GPL.  You can use the scale() function on a GRAPH statement and a PAGE statement.  Scale takes either a percentage or a value specified in pixels, inches, or centimeters.  
 
I’m a bit confused about 2 x’s and 2 y’s and translating this into 3 vars by 6 vars and am not going to wrap my head around this right now. Note that you can layout multiple graphs within a “page” with the GRAPH: begin() function.
 
From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Jon K Peck
Sent:
Friday, February 08, 2013 1:51 PM
To:
[hidden email]
Subject:
Re: Plotting questions

 
Maybe the Graphs > Regression Variable Plots extension command (STATS REGRES PLOT) would do what you want.  It will give you a set of plots of one or more dependent variables against a list of predictors (categorical or continuous), and it can include various types of fit lines).

This command is in the Python Essentials for V21, but it can be downloaded from the SPSS Community site for earlier versions.



Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM

peck@...
new phone: 720-342-5621





From:        
"Maguin, Eugene" <emaguin@...>
To:        
[hidden email],
Date:        
02/08/2013 01:45 PM
Subject:        
[SPSSX-L] Plotting questions
Sent by:        
"SPSSX(r) Discussion" <[hidden email]>





I have several plotting questions. The whole purpose of this is to look at regression scatterplots for outlier values. So I want to see the scatterplot plus the regression line.

What I've got is 3 vars by 6 vars.
In graph, the command would be, for instance,

Graph scatterplot(matrix) x1 x2 y1 y2.

So that isn't quite what I'd like because it give me a 4x4 set of plots. It'd be much better if I could get a 2x2 plot set. I had thought that

Graph scatterplot(matrix) x1 x2 with y1 y2.

Would work, but no, it won't. But maybe I didn't know how to do things. Is there a way?

Oh, yeah, and I have to edit the plot to add the regression line. I think there is a command to add a regression line but I didn't see it documented. Is it? What is it?

It seems that spss has a fixed "frame" size (which is probably not the right word) for the plot itself, regardless of whether the plot is x1 with y1 or x1 x2 y1 y2. Oh, yes, I'll bet the answer is NO, but can the frame size manipulated? If you're screening scatterplots and you have, just saying, a 3 by 6 matrix of variables, it'd be oh so very nice to make the frame taller so the plots don't look like your little fingernail.

NOW, let's switch over to GGraph.
Courtesy of ViAnn and, I think, Marta, I can use ggraph to plot a 3x2 (x1 x2 x3 with y1 y2) and put regression lines on the plots although a database restructure is required.
Again the frame size question applies because I'd like to make the framesize taller to plot more than 3x2. So, can the frame size be manipulated in ggraph?

Thanks, Gene Maguin

=====================
To manage your subscription to SPSSX-L, send a message to

LISTSERV@... (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: Plotting questions

Maguin, Eugene

Oh Jon, I’ll bet that is just so true. Thanks. Gene Maguin

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Jon K Peck
Sent: Friday, February 08, 2013 4:38 PM
To: [hidden email]
Subject: Re: Plotting questions

 

The extension command I mentioned gives you control over the size as well as number of plots per row.  It has some other bells and whistles, too.  It does all this, by the way, by generating the GPL specifying all the plots.  If you look at that generated GPL, you will likely agree that you wouldn't want to write it by hand.



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




From:        ViAnn Beadle <[hidden email]>
To:        [hidden email],
Date:        02/08/2013 02:19 PM
Subject:        Re: [SPSSX-L] Plotting questions
Sent by:        "SPSSX(r) Discussion" <[hidden email]>





To get back to Gene’s original question, the frame size can be manipulated in ggraph via GPL.  You can use the scale() function on a GRAPH statement and a PAGE statement.  Scale takes either a percentage or a value specified in pixels, inches, or centimeters.  
 
I’m a bit confused about 2 x’s and 2 y’s and translating this into 3 vars by 6 vars and am not going to wrap my head around this right now. Note that you can layout multiple graphs within a “page” with the GRAPH: begin() function.
 
From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Jon K Peck
Sent:
Friday, February 08, 2013 1:51 PM
To:
[hidden email]
Subject:
Re: Plotting questions

 
Maybe the Graphs > Regression Variable Plots extension command (STATS REGRES PLOT) would do what you want.  It will give you a set of plots of one or more dependent variables against a list of predictors (categorical or continuous), and it can include various types of fit lines).

This command is in the Python Essentials for V21, but it can be downloaded from the SPSS Community site for earlier versions.



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





From:        
"Maguin, Eugene" <[hidden email]>
To:        
[hidden email],
Date:        
02/08/2013 01:45 PM

Subject:        
[SPSSX-L] Plotting questions
Sent by:        
"SPSSX(r) Discussion" <[hidden email]>






I have several plotting questions. The whole purpose of this is to look at regression scatterplots for outlier values. So I want to see the scatterplot plus the regression line.

What I've got is 3 vars by 6 vars.
In graph, the command would be, for instance,

Graph scatterplot(matrix) x1 x2 y1 y2.

So that isn't quite what I'd like because it give me a 4x4 set of plots. It'd be much better if I could get a 2x2 plot set. I had thought that

Graph scatterplot(matrix) x1 x2 with y1 y2.

Would work, but no, it won't. But maybe I didn't know how to do things. Is there a way?

Oh, yeah, and I have to edit the plot to add the regression line. I think there is a command to add a regression line but I didn't see it documented. Is it? What is it?

It seems that spss has a fixed "frame" size (which is probably not the right word) for the plot itself, regardless of whether the plot is x1 with y1 or x1 x2 y1 y2. Oh, yes, I'll bet the answer is NO, but can the frame size manipulated? If you're screening scatterplots and you have, just saying, a 3 by 6 matrix of variables, it'd be oh so very nice to make the frame taller so the plots don't look like your little fingernail.

NOW, let's switch over to GGraph.
Courtesy of ViAnn and, I think, Marta, I can use ggraph to plot a 3x2 (x1 x2 x3 with y1 y2) and put regression lines on the plots although a database restructure is required.
Again the frame size question applies because I'd like to make the framesize taller to plot more than 3x2. So, can the frame size be manipulated in ggraph?

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: Plotting questions

Andy W
In reply to this post by Maguin, Eugene
This is confusing what you want, and as always it would be helpful to provide an example data set and the plots showing your problem.

What do you mean by "Frame Size" exactly? There are three possible interpretations I can think of;

 - A) The range of the x and y axis that define the plotting area. That is the literal black outline around a scatterplot.
 - B) The scale of the chart that takes up the graphic in the output viewer (this is what Jon and ViAnn refer to.) That is does "scatterplot 1" take up 10 - 40% of the x-area and 10-80% of the y-area in the graphic, and "scatterplot 2" take up the x-area 50 - 90% of the graphic and 10-80% of the y-area.
 - C) The actual size of the entire graphic in the output viewer.

Without knowing which one is the problem, I can't give you useful advice (because the advice for all 3 would be different!) Specifically, fixing C) can't be done in GGRAPH, but needs to be done in the chart template (which is a pretty simple fix actually). A) Is a problem that has to do with the scaling of the different variables (e.g. x1 has a range 0 - 100 and x2 has a range 1,000 to 20,000) and has no obvious solution but several potential ones (which may or may not involve manipulating B).
Andy W
apwheele@gmail.com
http://andrewpwheeler.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

Re: Plotting questions

Jon K Peck
The extension command I mentioned can control the absolute size of the entire plot, dividing up the area into the individual small plots according to the specification of the number of plots per row.  the GPL PAGE statement controls the overall plot size while the GRAPH statement apportions the space within the page.


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




From:        Andy W <[hidden email]>
To:        [hidden email],
Date:        02/10/2013 06:54 AM
Subject:        Re: [SPSSX-L] Plotting questions
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




This is confusing what you want, and as always it would be helpful to provide
an example data set and the plots showing your problem.

What do you mean by "Frame Size" exactly? There are three possible
interpretations I can think of;

- A) The range of the x and y axis that define the plotting area. That is
the literal black outline around a scatterplot.
- B) The scale of the chart that takes up the graphic in the output viewer
(this is what Jon and ViAnn refer to.) That is does "scatterplot 1" take up
10 - 40% of the x-area and 10-80% of the y-area in the graphic, and
"scatterplot 2" take up the x-area 50 - 90% of the graphic and 10-80% of the
y-area.
- C) The actual size of the entire graphic in the output viewer.

Without knowing which one is the problem, I can't give you useful advice
(because the advice for all 3 would be different!) Specifically, fixing C)
can't be done in GGRAPH, but needs to be done in the chart template (which
is a pretty simple fix actually). A) Is a problem that has to do with the
scaling of the different variables (e.g. x1 has a range 0 - 100 and x2 has a
range 1,000 to 20,000) and has no obvious solution but several potential
ones (which may or may not involve manipulating B).



-----
Andy W
[hidden email]
http://andrewpwheeler.wordpress.com/
--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Plotting-questions-tp5718009p5718017.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