GPL: Coloring a boxplot

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

GPL: Coloring a boxplot

la volta statistics

 

Dear All

 

I would like to color a boxplot and use the following syntax:

 

GGRAPH

  /GRAPHDATASET NAME="graphdataset" VARIABLES=salary MISSING=LISTWISE

  REPORTMISSING=NO

  /GRAPHSPEC SOURCE=INLINE.

BEGIN GPL

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

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

 DATA: id=col(source(s), name("$CASENUM"), unit.category())

 COORD: rect(dim(1), transpose())

 GUIDE: axis(dim(1), label("Current Salary"))

 ELEMENT: schema(position(bin.quantile.letter(salary)), color(color.red))

END GPL.

 

This works for SPSS 15 but not for SPSS 19. Is there a way to get the box red using syntax?

 

TIA, Christian

 

 

**********************************
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:
[hidden email] 
Web:
www.lavolta.ch

 

Reply | Threaded
Open this post in threaded view
|

Re: GPL: Coloring a boxplot

Jon K Peck
That worked fine when I tried it in 19 (19.0.0.1) and in 20.

Jon Peck (no "h")
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From:        la volta statistics <[hidden email]>
To:        [hidden email]
Date:        08/29/2011 08:05 AM
Subject:        [SPSSX-L] GPL: Coloring a boxplot
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




 
Dear All
 
I would like to color a boxplot and use the following syntax:
 
GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=salary MISSING=LISTWISE
  REPORTMISSING=NO
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
 SOURCE: s=userSource(id("graphdataset"))
 DATA: salary=col(source(s), name("salary"))
 DATA: id=col(source(s), name("$CASENUM"), unit.category())
 COORD: rect(dim(1), transpose())
 GUIDE: axis(dim(1), label("Current Salary"))
 ELEMENT: schema(position(bin.quantile.letter(salary)), color(color.red))
END GPL.
 
This works for SPSS 15 but not for SPSS 19. Is there a way to get the box red using syntax?
 
TIA, Christian
 
 
**********************************
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@...
Web:
www.lavolta.ch