LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2003)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 20 Nov 2003 17:33:17 -0500
Reply-To:     Mark Davenport <madavenp@OFFICE.UNCG.EDU>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Mark Davenport <madavenp@OFFICE.UNCG.EDU>
Subject:      Re: pie chart colors and size
Comments: To: mperry@pitt.k12.nc.us
Content-Type: text/plain; charset=US-ASCII

Sounds to me like you need to create a ChartLook and a macro to create your charts with the new ChartLook referenced in the syntax. Not real difficult, if I understand your needs.

Below is an example that creates a bar chart with identical colors and the chart size set using syntax (all of these options can be found in the SPSS Syntax Guide. The macro causes this on chart program to be run 10 times using a different variable each time. It can be easily adapted to a pie chart. However, without knowing more about your data, it would be hard for me to adapt this sytax to your needs.

Mark

SET MPRINT=no.

DEFINE !chart (var1=!TOKENS(1)) IGRAPH /VIEWNAME='Bar Chart for Item 1' /X1 = VAR(!var1) TYPE = CATEGORICAL /Y = $count /COORDINATE = VERTICAL /X1LENGTH=2.0 /YLENGTH=2.0 /X2LENGTH=2.0 /CHARTLOOK='C:\SPSS11_5\Looks\Greyscale.clo' /CATORDER VAR(!var1) (ASCENDING VALUES OMITEMPTY) /BAR KEY=OFF LABEL OUTSIDE VAL SHAPE = RECTANGLE BASELINE = AUTO. EXECUTE.

!ENDDEFINE.

SET MPRINT=yes.

!chart var1=item1. !chart var1=item2. !chart var1=item3. !chart var1=item4. !chart var1=item5. !chart var1=item6. !chart var1=item7. !chart var1=item8. !chart var1=item9. !chart var1=item10.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Mark A. Davenport Ph.D. Asst to the Vice Chancellor for Student Affairs/Research and Evaluation The University of North Carolina at Greensboro 149 Mossman Bldg. Greensboro, NC 27402-6170 336.334.5099 madavenp@office.uncg.edu

'An approximate answer to the right problem is worth a good deal more than an exact answer to an approximate problem' -- J. W. Tukey


Back to: Top of message | Previous page | Main SPSSX-L page