Date: Mon, 11 Aug 2008 14:12:59 +0200
Reply-To: la volta statistics <schmidhauser@lavolta.ch>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: la volta statistics <schmidhauser@lavolta.ch>
Subject: GPL: Hiding categories with no data
Content-Type: text/plain; charset="iso-8859-1"
Hi all
I want to hide the empty categories in each panel from the example below.
That is: in the first panel I want to show only the Pat. No. 1, 4, 6, 7, 10,
11, 14 on the X-axis, and in the second panel I want only the Pat. No. 2, 3,
5, 9, 12, 13 on the X-axis.
Is that possible? and how can this be done? I am using SPSS 15
Thanks in advance
Christian
* Example:
**********.
DATA LIST FREE /P01_pat(F8.0) Sequence (F8.0) Pk1 Pk2 .
BEGIN DATA
1 1 310 270
4 1 310 260
6 1 370 300
10 1 250 210
11 1 380 350
14 1 330 365
2 2 370 385
3 2 310 400
5 2 380 410
9 2 290 320
12 2 260 340
13 2 90 220
END DATA.
Var LAbel Pk1 'Peak'
/Pk2 'Peak'
/P01_pat 'Pat. No.'
/Sequence 'Sequence'.
Val LAbel Sequence 1 'A/B'
2 'B/A'.
VARSTOCASES /ID = id
/MAKE Pk FROM Pk1 Pk2
/INDEX = Teatment(2)
/KEEP = P01_pat Sequence
/NULL = KEEP.
Var Label Teatment 'Teatment'.
Val LAbel Teatment 1 'A'
2 'B'.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=P01_pat Pk Teatment Sequence
MISSING = LISTWISE REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: P01_pat=col(source(s), name("P01_pat"), unit.category())
DATA: Pk=col(source(s), name("Pk"), unit.category())
DATA: Teatment=col(source(s), name("Teatment"), unit.category())
DATA: Sequence=col(source(s), name("Sequence"), unit.category())
GUIDE: axis(dim(1), label("Pat. No."))
GUIDE: axis(dim(2), label("Peak"))
GUIDE: legend(aesthetic(aesthetic.color.exterior), label("Teatment"))
SCALE: cat(dim(1))
SCALE: cat(dim(2))
SCALE: cat(aesthetic(aesthetic.color.exterior))
ELEMENT: point(position((P01_pat*Pk)* Sequence), color.exterior(Teatment))
END GPL.
*******************************
la volta statistics
Christian Schmidhauser, Dr.phil.II
Weinbergstrasse 108
CH-8006 Zürich
Tel: +41 (043) 233 98 01
Fax: +41 (043) 233 98 02
email: mailto:schmidhauser@lavolta.ch
internet: http://www.lavolta.ch/
=====================
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
|