Date: Fri, 16 Sep 2005 16:31:45 +0200
Reply-To: lucameyer@tiscali.it
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Luca Meyer <lucameyer@tiscali.it>
Organization: Luca Meyer
Subject: R: SPSS graphing books or articles
Content-Type: text/plain; charset="iso-8859-1"
Following up with what I have asked yesterday I have found that within the
Chart Editor is possible to edit the order of the labels within a
categorical variable (see Edit => Select X(Y) Axis => Categories => Sort by
Custom and then move up and down the categories as you wish). Problem: How
do I automatize such an operation?
Here are some test data and the SPSS 13.0.1 syntax that will produce the
graph:
DATA LIST / Var1 1 (A) Total 3-7 Category 8-13 Company 15-20.
BEGIN DATA
B 15,52 12,35 38,08
A 21,41 16,15 38,08
C 7,24 4,64
D 26,12 20,35 38,08
E 9,89 7,41 38,08
END DATA.
FORMAT Total TO Company (F5.2).
LIST.
GRAPH
/TITLE="% Factor 1"
/BAR(GROUPED)=
MEAN(Total)
MEAN(Category)
MEAN(Company)
BY Var1
/MISSING=VARIABLE INCLUDE.
Now, what I would need is a script that
(A) automatically changes the order of the labels in the X-axis from
A-B-C-D-E to B-A-C-D-E, better if an autoscript;
(B) changes the colors of the bars to some user-defined values;
Someone can help me?
Thanks,
Luca
Mr. Luca MEYER
Survey research, data analysis & more: http://www.lucameyer.com/
Tel: +390122854456 - Fax: +390122854837 - Mobile: + 393394950021
"If you can't feed a hundred people, then feed just one." - Mother Teresa -
www.thehungersite.com
> -----Messaggio originale-----
> Da: Luca Meyer [mailto:lucameyer@tiscali.it]
> Inviato: giovedì 15 settembre 2005 15.20
> A: 'SPSSX-L@LISTSERV.UGA.EDU'
> Oggetto: SPSS graphing books or articles
>
>
> Hello,
>
> I would like to learn how to use the graphing facility of
> SPSS, any books/articles/papers/web sites you can advice that
> introduce to the GRAPH and IGRAPH functions.
>
> Also, a practical case:
>
> GRAPH
> /TITLE="Title"
> /BAR(GROUPED)=
> MEAN(TotalP)
> MEAN(CategoryP)
> MEAN(FirmP)
> BY Var1
> /MISSING=VARIABLE INCLUDE.
>
> Will give me a graph such that the categories of Var1 are
> ordered according alphabetically, but can I order them as I
> want instead?
>
> Thanks,
>
> Luca
>
> Mr. Luca MEYER
> Survey research, data analysis & more: http://www.lucameyer.com/
> Tel: +390122854456 - Fax: +390122854837 - Mobile: + 393394950021
>
> "If you can't feed a hundred people, then feed just one." -
> Mother Teresa - www.thehungersite.com
>
>
|