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 (January 2000)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 25 Jan 2000 15:42:26 -0600
Reply-To:     "Lucas, Gail" <glucas@SPSS.COM>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         "Lucas, Gail" <glucas@SPSS.COM>
Subject:      Re: Scatterplot overlay median bar graph
Comments: To: King Douglas <King_Douglas@AMRCORP.COM>

You can create the graph you want if you use Interactive Graphics. I tried it in SPSS 10.0.5, but I would imagine that this would also work in SPSS 9.

Once the data is in SPSS, go to Graphs->Interactive->Bar. Place your score variable on the y axis, and the group variable on the x axis. Right click on the score variable and select Scale. Right click on the group variable and select Category. At the bottom of the dialog box, you should see "Bars represent" and then a drop down list. Select Median from the drop down list. Then click OK. A bar graph will be created that contains three bars, which displays the median for each group.

Then, double click on the Interactive Graph to bring it into edit mode. Go to Insert->Cloud. A scatterplot will be inserted. Double click on one of the circles, and a Cloud dialog box will appear. Select a color other than red, (I used black). Click Apply, then OK. You should then be able to see all of the circles on the graph.

Here is the syntax that the Interactive Graph dialog box generated. This will create the bar chart. The scatterplot will still need to be inserted.

Gail SPSS Technical Support.

IGRAPH /VIEWNAME='Bar Chart' /X1 = VAR(group) TYPE = CATEGORICAL /Y = VAR (score) TYPE = SCALE /COORDINATE = VERTICAL /X1LENGTH=3.0 /YLENGTH=3.0 /X2LENGTH=3.0 /CHARTLOOK='NONE' /CATORDER VAR(group) (ASCENDING VALUES OMITEMPTY) /BAR(MEDIAN) KEY=ON LABEL INSIDE VAL SHAPE = RECTANGLE BASELINE = AUTO.

-----Original Message----- From: King Douglas [mailto:King_Douglas@AMRCORP.COM] Sent: Tuesday, January 25, 2000 11:00 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Scatterplot overlay median bar graph

I want to create an overlay graph similar to the simulation provided below. I have scores for three groups. I want to represent each data point on a group*score scatterplot, overlaying a bar chart representing the median for each group. Sample data are provided below. Any guidance or suggestions would be very much appreciated.

King Douglas American Airlines

| X |200 - X | - X | - X X S | - X X | - X X C |150 - _ | - X | | X 0 | - |X| | - X | | X R | - _ |X| _ |100 - | | | | | | E | - |X| |X| |X| | - |X| | | | | | - |X| | | |X| | - |X| |X| | | |50 - | | |X| |X| | - | | | | | | | - |X| | | | | | - | | | | | | | - | | | | | | | 0 - - - - - - - - - - - 1 2 3 G R O U P

DATA LIST /1 GROUP 1 SCORE 3-5 MED 7-8. BEGIN DATA 1 188 134 1 172 134 1 148 134 1 140 134 1 134 134 1 130 134 1 125 134 1 110 134 1 85 134 2 205 151 2 177 151 2 170 151 2 160 151 2 151 151 2 145 151 2 139 151 2 115 151 2 109 151 3 166 140 3 159 140 3 140 140 3 111 140 3 92 140 END DATA.


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