|
In the older versions of SPSS, there was something called the sunflower
option to show multiple cases at the same point in a scatter plot. Does anyone know how to do that in Version 14 and up? Bill __________________________________________________________________________ William B. Ware, Professor Educational Psychology, CB# 3500 Measurement, and Evaluation University of North Carolina PHONE (919)-962-7848 Chapel Hill, NC 27599-3500 FAX: (919)-962-1533 Office: 118 Peabody Hall EMAIL: [hidden email] Adjunct Professor School of Social Work __________________________________________________________________________ |
|
The nearest equivalent I can think of to the old sunflower option is the
binhex function in GPL. It groups together nearby points and then you use the summary.count function to count the number of hits within the bin to set the size of the point displayed. This produces a plot sometimes referred to as bubble plot. Here's some sample syntax which produces a "bubble" plot using the employee data.sav sample file. The SCALE command constrains the minimum point size to 5 pixels. IMHO, the default sizing creates really, really small 1 pixel points which look like dust on my monitor--so this gets around that. The color.interior fills in the points (defaults to circles). I think the default hollow points are ugly--so this gets around that. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=prevexp jobtime MISSING= LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: prevexp=col(source(s), name("prevexp")) DATA: jobtime=col(source(s), name("jobtime")) GUIDE: axis(dim(1), label("Previous Experience (months)")) GUIDE: axis(dim(2), label("Months since Hire")) SCALE: linear(aesthetic(aesthetic.size), aestheticMinimum(size."5px")) ELEMENT: point(position(bin.hex(prevexp*jobtime, dim(1,2))), size(summary.count()), color.interior(color.blue)) END GPL. The IGRAPH procedure also provides a jittering option which nudges the points slightly apart by adding a small amount of random variation, but I think the GPL binhex approach works much better. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of William B. Ware Sent: Wednesday, July 25, 2007 9:49 AM To: [hidden email] Subject: Old Sunflower Option In the older versions of SPSS, there was something called the sunflower option to show multiple cases at the same point in a scatter plot. Does anyone know how to do that in Version 14 and up? Bill __________________________________________________________________________ William B. Ware, Professor Educational Psychology, CB# 3500 Measurement, and Evaluation University of North Carolina PHONE (919)-962-7848 Chapel Hill, NC 27599-3500 FAX: (919)-962-1533 Office: 118 Peabody Hall EMAIL: [hidden email] Adjunct Professor School of Social Work __________________________________________________________________________ |
|
Hi All,
We tried to run the syntax example on our "Employee data.sav" file. As we have a German version the variable names were translated to German. Does anybody know how we could obtain sample files in English? Best regards Georg Maubach Research Manager -----Ursprüngliche Nachricht----- Von: SPSSX(r) Discussion [mailto:[hidden email]] Im Auftrag von ViAnn Beadle Gesendet: Mittwoch, 25. Juli 2007 18:31 An: [hidden email] Betreff: Re: Old Sunflower Option The nearest equivalent I can think of to the old sunflower option is the binhex function in GPL. It groups together nearby points and then you use the summary.count function to count the number of hits within the bin to set the size of the point displayed. This produces a plot sometimes referred to as bubble plot. Here's some sample syntax which produces a "bubble" plot using the employee data.sav sample file. The SCALE command constrains the minimum point size to 5 pixels. IMHO, the default sizing creates really, really small 1 pixel points which look like dust on my monitor--so this gets around that. The color.interior fills in the points (defaults to circles). I think the default hollow points arre ugly--so this gets around that. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=prevexp jobtime MISSING= LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: prevexp=col(source(s), name("prevexp")) DATA: jobtime=col(source(s), name("jobtime")) GUIDE: axis(dim(1), label("Previous Experience (months)")) GUIDE: axis(dim(2), label("Months since Hire")) SCALE: linear(aesthetic(aesthetic.size), aestheticMinimum(size."5px")) ELEMENT: point(position(bin.hex(prevexp*jobtime, dim(1,2))), size(summary.count()), color.interior(color.blue)) END GPL. The IGRAPH procedure also provides a jittering option which nudges the points slightly apart by adding a small amount of random variation, but I think the GPL binhex approach works much better. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of William B. Ware Sent: Wednesday, July 25, 2007 9:49 AM To: [hidden email] Subject: Old Sunflower Option In the older versions of SPSS, there was something called the sunflower option to show multiple cases at the same point in a scatter plot. Does anyone know how to do that in Version 14 and up? Bill __________________________________________________________________________ William B. Ware, Professor Educational Psychology, CB# 3500 Measurement, and Evaluation University of North Carolina PHONE (919)-962-7848 Chapel Hill, NC 27599-3500 FAX: (919)-962-1533 Office: 118 Peabody Hall EMAIL: [hidden email] Adjunct Professor School of Social Work __________________________________________________________________________ |
|
Hallo William,
if you let the datapoints jitter around their true values the scatterplot looks nicer than a sunflower plot. Just add a randovariable to your descrete variables. flo |
| Free forum by Nabble | Edit this page |
