Date: Fri, 28 May 2010 16:37:56 -0600
Reply-To: ViAnn Beadle <firstname.lastname@example.org>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: ViAnn Beadle <email@example.com>
Subject: Re: help with graphics
Content-Type: text/plain; charset="UTF-8"
Note that you don't have to use an aggregation function in GPL--select value as the statistic in the Chart Builder and you get no aggregation.
The more I think about it, the R example doesn't really produce a spaghetti chart because I have never seen multi-colored spaghetti. Rather than specifying the locid as a color attribute, it probably better to just use the split function instead to produce multiple black lines, one for each locid. That also dispenses with having to explicitly null out the legend since the R article doesn't include one.
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Bruce Weaver
Sent: Friday, May 28, 2010 4:15 PM
Subject: Re: help with graphics
Is R necessary? Can't one just restructure to a file with multiple rows per ID (if necessary), and use an ordinary line graph? E.g., does this not do what the OP is asking for?
* Modify path to file if necessary .
GET FILE='C:\Program Files\SPSSInc\PASWStatistics17\Samples\testmarket.sav'.
* Note that the file has a LONG format -- i.e., there are
* multiple rows per Location ID (locid). If your data file
* has one row per ID, you'll need to restructure it with
* Now make a spaghetti plot .
* Via the GRAPH command (for us old-school types) .
/LINE(MULTIPLE)=MEAN(sales) BY week BY locid.
* And now via the new-fangled Chart Builder .
/GRAPHDATASET NAME="graphdataset" VARIABLES=week MEAN(sales)[name="MEAN_sales"] locid
DATA: week=col(source(s), name("week"), unit.category())
DATA: MEAN_sales=col(source(s), name("MEAN_sales"))
DATA: locid=col(source(s), name("locid"), unit.category())
GUIDE: axis(dim(1), label("Week"))
GUIDE: axis(dim(2), label("Mean Units sold in thousands"))
GUIDE: legend(aesthetic(aesthetic.color.interior), label("Location ID"))
SCALE: linear(dim(2), include(0))
ELEMENT: line(position(week*MEAN_sales), color.interior(locid),
Rick Oliver wrote:
> If you search for "spaghetti plot" on Google, one of the hits appears
> to provide a way to use R with Statistics 18 to obtain a spaghetti plot.
> Karen Soeken <firstname.lastname@example.org>
> 05/28/2010 02:44 PM
> Re: help with graphics
> Sent by:
> "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
> It's a plot that looks like a bunch of spaghetti showing the data
> points for each subject across time.
> ----- Original Message -----
> From: ViAnn Beadle
> To: 'Karen Soeken' ; SPSSX-L@LISTSERV.UGA.EDU
> Sent: Friday, May 28, 2010 3:21 PM
> Subject: RE: help with graphics
> What’s a spaghetti plot? Can you point us to examples on the web?
> From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf
> Of Karen Soeken
> Sent: Friday, May 28, 2010 9:54 AM
> To: SPSSX-L@LISTSERV.UGA.EDU
> Subject: help with graphics
> I need to create spaghetti plots using PASW v. 18. Is it possible to do?
> If so, how?
"When all else fails, RTFM."
NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.
View this message in context: http://old.nabble.com/help-with-graphics-tp28708648p28712469.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.
To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (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
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
For a list of commands to manage subscriptions, send the command