|
Hi
I would like to apply the data labels (counts) to a pie chart using a template. This seems not to work for counts although it works for the data labels percentage. Here is an example using the employee data.sav. The template I use is also included. Does anybody have a solution? I am using SPSS 15.0.1.1. Thanks, Christian GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat COUNT()[name= "COUNT"] gender MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: jobcat=col(source(s), name("jobcat"), unit.category()) DATA: COUNT=col(source(s), name("COUNT")) DATA: gender=col(source(s), name("gender"), unit.category()) SCALE: cat(aesthetic(aesthetic.color.interior), map(("1",color.red), ("2",color.blue))) COORD: polar.theta(startAngle(0)) GUIDE: axis(dim(1), null()) GUIDE: axis(dim(3), label("Employment Category"), opposite()) GUIDE: legend(aesthetic(aesthetic.color.interior), null()) SCALE: linear(dim(1), dataMinimum(), dataMaximum()) ELEMENT: interval.stack(position(summary.percent(COUNT*1*jobcat))),color.interior(gen der)) END GPL. <?xml version="1.0" encoding="UTF-8" standalone="no"?> <template SPSS-Version="2.2" date="2008-10-30" description="" selectPath="72 73 74 75 76 93 " xmlns="http://xml.spss.com/spss/visualization" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xml.spss.com/spss/visualization http://xml.spss.com/spss/visualization/vizml-template-3.0.xsd"> <addDataLabels colorByMarker="false" hidden="false" showCollidingLabels="false"> <style font-size="7px" number="0" visible="visible"/> <style color="#ffffff" color2="#000000" number="1" visible="true"/> <labeling variable="xortheta"/> <labeling variable="xortheta"> <numberFormat maximumFractionDigits="0" minimumFractionDigits="0" suffix="" useGrouping="true"/> </labeling> </addDataLabels> </template> ********************************** 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:[hidden email]> mailto:[hidden email] Web: <http://www.lavolta.ch> www.lavolta.ch ====================To manage your subscription to SPSSX-L, send a message to [hidden email] (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 |
| Free forum by Nabble | Edit this page |
