Scattergram

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

Scattergram

Katie Lupoli
Hello all,
 
I am a relatively new user, and I am trying to build a scattergram as follows:
 
- the y axis reads : 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, and 16
- the x axis reads: 16-27
- instead of markers at each observation, I would like SPSS to use a number to indicate how many observations there are at any one point
 
Any help would be greatly appreciated!
Reply | Threaded
Open this post in threaded view
|

Re: Scattergram

Maguin, Eugene

I don’t know that you can plot a number instead of a dot on the scatterplot but there are very knowledgeable people on the list who will know. I suspect that you will have to do this in GPL. As far as I know, you should have gotten the GPL manual with your spss installation. Example 3.74 shows what they call a ‘bubble plot’. The key element is that points are plotted as circles whose size is dependent on a third variable. In the example syntax below, it is ‘prevexp’. In your case it would be either the exact number of cases or grouped number of cases, e.g., 30-40.

You say you are a relatively new user and, given that, using the syntax may be impossible. I’d guess that you could do this type of chart from the Chart Builder menu but I don’t know for sure or how. Somebody else will.

 

I’ve modified the 3.74 syntax below but it is untested. X is the x variable, Y is the y variable and N is the number of cases variable.

 

Figure 3-74

GPL for bubble plot

 

GGRAPH /GRAPHDATASET NAME=”DS” VARIABLES=X Y N/GRAPHSPEC SOURCE=INLINE.

BEGIN GPL

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

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

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

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

SCALE: linear(aesthetic(aesthetic.size),

aestheticMinimum(size."5px"), aestheticMaximum(size."35px"))

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

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

GUIDE: legend(aesthetic(aesthetic.size), label("N Cases"))

ELEMENT: point(position(X*Y), size(N))

END GPL.

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Katie Lupoli
Sent: Tuesday, November 06, 2012 3:26 PM
To: [hidden email]
Subject: Scattergram

 

Hello all,

 

I am a relatively new user, and I am trying to build a scattergram as follows:

 

- the y axis reads : 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, and 16

- the x axis reads: 16-27

- instead of markers at each observation, I would like SPSS to use a number to indicate how many observations there are at any one point

 

Any help would be greatly appreciated!

Reply | Threaded
Open this post in threaded view
|

Re: Scattergram

David Marso
Administrator
In reply to this post by Katie Lupoli
aggregate break on x and y get count as variable from aggregate.
If you don't mind an old school graph:
GRAPH
  /SCATTERPLOT(BIVAR)=q5_4 WITH q5_3 BY n_break (NAME)
  /MISSING=LISTWISE .

Others might have the new graph syntax handy (or you can play around and figure it out -perhaps in combination with consultation of the documentation-).
You most likely need to aggregate to get the element to use for the labeling.
--
IMNSHO: What you are proposing is a rather dodgy idiom for communicating information about the data via visualization.  
The numbers do NOT visually communicate the important features -density- of the scatter (which is the whole point of the graph to begin with.  Maybe the size of the point rather than the number?  Maybe some sort of clustered bar chart?  Anything IMO other than a scatterplot with numbers (how is that very different than a simple 2 way table!!!
(note padding on clue stick)
--

Katie Lupoli wrote
Hello all,

I am a relatively new user, and I am trying to build a scattergram as
follows:

- the y axis reads : 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, and 16
- the x axis reads: 16-27
- instead of markers at each observation, I would like SPSS to use a number
to indicate how many observations there are at any one point

Any help would be greatly appreciated!
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Scattergram

David Marso
Administrator
In reply to this post by Maguin, Eugene
Actually (as my posting shows you can indeed do it even with dusty OLD 20th century dino graph  !!...).
For some reason my IGRAPH doesn't show at the moment but you can control size with it.
I would be VERY surprised if one can't do it with GPL OTOH as I stated it is a rather dodgy sort of graph and not compelling from an information rich perspective.
--
Maguin, Eugene wrote
I don't know that you can plot a number instead of a dot on the scatterplot but there are very knowledgeable people on the list who will know. I suspect that you will have to do this in GPL. As far as I know, you should have gotten the GPL manual with your spss installation. Example 3.74 shows what they call a 'bubble plot'. The key element is that points are plotted as circles whose size is dependent on a third variable. In the example syntax below, it is 'prevexp'. In your case it would be either the exact number of cases or grouped number of cases, e.g., 30-40.
You say you are a relatively new user and, given that, using the syntax may be impossible. I'd guess that you could do this type of chart from the Chart Builder menu but I don't know for sure or how. Somebody else will.

I've modified the 3.74 syntax below but it is untested. X is the x variable, Y is the y variable and N is the number of cases variable.

Figure 3-74
GPL for bubble plot

GGRAPH /GRAPHDATASET NAME="DS" VARIABLES=X Y N/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s = userSource(id("DS"))
DATA: X=col(source(s), name("X"))
DATA: Y=col(source(s), name("Y"))
DATA: N=col(source(s), name("N"))
SCALE: linear(aesthetic(aesthetic.size),
aestheticMinimum(size."5px"), aestheticMaximum(size."35px"))
GUIDE: axis(dim(2), label("Y"))
GUIDE: axis(dim(1), label("X"))
GUIDE: legend(aesthetic(aesthetic.size), label("N Cases"))
ELEMENT: point(position(X*Y), size(N))
END GPL.


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Katie Lupoli
Sent: Tuesday, November 06, 2012 3:26 PM
To: [hidden email]
Subject: Scattergram

Hello all,

I am a relatively new user, and I am trying to build a scattergram as follows:

- the y axis reads : 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, and 16
- the x axis reads: 16-27
- instead of markers at each observation, I would like SPSS to use a number to indicate how many observations there are at any one point

Any help would be greatly appreciated!
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Scattergram

David Marso
Administrator

AGGREGATE
  /OUTFILE='agg'
  /BREAK=happy life
  /N_BREAK=N.
get file 'agg'.
VARIABLE LEVEL  happy(SCALE).
VARIABLE LEVEL  life(SCALE).

* Dino style 'legacy' to the n00bs*.
GRAPH
  /SCATTERPLOT(BIVAR)=life WITH happy BY N_BREAK (NAME)
  /MISSING=LISTWISE.

* Epic failure "deprecated" style *.
IGRAPH /VIEWNAME='Scatterplot' /X1 = VAR(life) TYPE = SCALE /Y = VAR(happy)
  TYPE = SCALE /COORDINATE = VERTICAL /POINTLABEL = VAR(n_break) ALL
 /X1LENGTH=6.0 /YLENGTH=6.0 /X2LENGTH=3.0 /CHARTLOOK='NONE' /SCATTER
  COINCIDENT = NONE.

*New and ??improved?? style WOW! GET TO THE F'ing point!!!*.
GGRAPH
  /GRAPHDATASET NAME="graphdataset"
       VARIABLES=life happy N_BREAK MISSING=LISTWISE REPORTMISSING=NO
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: life=col(source(s), name("life"))
  DATA: happy=col(source(s), name("happy"))
  DATA: N_BREAK=col(source(s), name("N_BREAK"))
  GUIDE: axis(dim(1), label("Is Life Exciting or Dull"))
  GUIDE: axis(dim(2), label("General Happiness"))
  ELEMENT: point(position(life*happy), label(N_BREAK))
END GPL.

These 3 graphs look very similar to me.  Question?  Are we running backwards??

David Marso wrote
Actually (as my posting shows you can indeed do it even with dusty OLD 20th century dino graph  !!...).
For some reason my IGRAPH doesn't show at the moment but you can control size with it.
I would be VERY surprised if one can't do it with GPL OTOH as I stated it is a rather dodgy sort of graph and not compelling from an information rich perspective.
--
Maguin, Eugene wrote
I don't know that you can plot a number instead of a dot on the scatterplot but there are very knowledgeable people on the list who will know. I suspect that you will have to do this in GPL. As far as I know, you should have gotten the GPL manual with your spss installation. Example 3.74 shows what they call a 'bubble plot'. The key element is that points are plotted as circles whose size is dependent on a third variable. In the example syntax below, it is 'prevexp'. In your case it would be either the exact number of cases or grouped number of cases, e.g., 30-40.
You say you are a relatively new user and, given that, using the syntax may be impossible. I'd guess that you could do this type of chart from the Chart Builder menu but I don't know for sure or how. Somebody else will.

I've modified the 3.74 syntax below but it is untested. X is the x variable, Y is the y variable and N is the number of cases variable.

Figure 3-74
GPL for bubble plot

GGRAPH /GRAPHDATASET NAME="DS" VARIABLES=X Y N/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s = userSource(id("DS"))
DATA: X=col(source(s), name("X"))
DATA: Y=col(source(s), name("Y"))
DATA: N=col(source(s), name("N"))
SCALE: linear(aesthetic(aesthetic.size),
aestheticMinimum(size."5px"), aestheticMaximum(size."35px"))
GUIDE: axis(dim(2), label("Y"))
GUIDE: axis(dim(1), label("X"))
GUIDE: legend(aesthetic(aesthetic.size), label("N Cases"))
ELEMENT: point(position(X*Y), size(N))
END GPL.


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Katie Lupoli
Sent: Tuesday, November 06, 2012 3:26 PM
To: [hidden email]
Subject: Scattergram

Hello all,

I am a relatively new user, and I am trying to build a scattergram as follows:

- the y axis reads : 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, and 16
- the x axis reads: 16-27
- instead of markers at each observation, I would like SPSS to use a number to indicate how many observations there are at any one point

Any help would be greatly appreciated!
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Automatic reply: Scattergram

MICHAEL J TONER



Hello,

 

I will be out of the office on Wednesday, November 7, 2012. I will be back in the office on Thursday and will respond to your email (if necessary) then.

 

If you are an applicant to a Temple graduate program and have a question about the status of your application, you should contact the department to which you applied. They have your application file and are responsible for processing your application and making an admissions decision on it.

 

A link to the Graduate Bulletin, which has information on all of our graduate programs, is here: http://www.temple.edu/gradbulletin/alphaindex.htm

 

If you are an undergraduate applicant, someone from Undergraduate Admissions will respond to you soon.

 

If you are having an issue with our online application system or TUportal, please contact our Help Desk ([hidden email]).

 

Best,

 

Michael Toner

 

 

 

*********************************************

Michael J. Toner, Ph.D.

Associate Director, Graduate Enrollment and Data Management

Office of the Graduate School

Temple University

1803 N. Broad St.

501 Carnell Hall

Philadelphia, PA 19122-6095

phone 215.204.6577

fax 215.204.8781

email [hidden email]

web www.temple.edu/grad