100% stacked bar graph problem

April 22nd, 2006 mark

This Friday we got a question from Els, who has a problem with making her stacked bar graphs look good:

“As a trainee I am now analysing the results of a customer satisfactory investigation. Many people advised me to use SPSS, so I did.

Most of the questionnaire questions are built the same way (very dissatisfied, dissatisfied, satisfied, very satisfied).

The report will be devised in subjects (price, quality, reaction speed,etc). Each subject contains around 5 questions.

For each subject I made a horizontal graph in which all 5 questions regarding that subject are being displayed. This way I will analyze around 5 questions in each graph, as in this example.

bar1.gif

The stacked graphs I made myself are horizontal, 100% stacked, so the bar fills the entire graph horizontally (like in the example). So far, so good, it looks great!

Then the problem: Inside the bars I would like to show the exact percentage over that question.(like in the example).

The problem is, that these figures are incorrect. Now I see the percentage concerning the entire graph, all the questions together, in stead of per question.

Can you tell me what I have to do to change the figures inside the bars from a percentage over the entire graph to a percentage over the bar?”

To solve the problem we will describe step by step how to make a 100% stacked bar chart, and how to get the exact percentages into it. First select Tables > Tables of frequencies.

Now drag the five questions you want to make graphs for to Frequencies for. Click on statistics and choose percent. Click ok, and you are back at the ‘tables of frequencies’ screen. By clicking ok again you will get a table.
Select the table by double-clicking, then click the right-mouse button and select create graph > bar. Now you will get the following screen (click on the picture to show the screen shot in full size):

stackedbar2.jpg
Click at the red marked button in the picture above. In this screen you can change the option cluster after ‘color’ into stack. Go back to the graph and click on the button Horizontale orientation.

After this you have to double click on one of the bars. A new screen will open. In this screen you can click on values in bar labels. Now you can choose the location of the percent value. Now click on inside base and then click ok. Then you will have 100% stacked bars, with the exact percentage on that question inside.

Do you also need an answer to your SPSS question, submit your question here.

Entry Filed under: 4. Modifying SPSS output, Questions and answers

15 Comments Add your own

  • 1. Els  |  April 23rd, 2006 at 9:22 am

    Yes!!! It worked!!! Thank you so much!!!

    As a reaction on this question many people told me it was simply impossible to make this chart with SPSS!!! You showed me they were wrong!!!! It worked!
    Thank you so much!!

    Kind regards,
    Els

  • 2. Els  |  April 23rd, 2006 at 9:38 am

    One more question regarding this graph…

    Normally it is possible to exclude certain groups out of the graph after making it. I now tried to remove the “not applicable” group out of the table by turning of that group in the “color legend”, but now somehow this does not work.. Is there another way to do this?

    Thanks again for your help!!!

    Kind regards Els

  • 3. Mark  |  April 23rd, 2006 at 11:23 am

    Just delete the data + name of the group in the table before making the graph. That should work.

    Mark

  • 4. Els  |  April 23rd, 2006 at 3:08 pm

    Hi Mark!

    Thanks again for a super quick response!
    I am very sorry to bother you again with a question regarding the same…

    If I delete it like you told me, the total percentage of the graph is not 100% anymore. I like to exclude the “not applicable” from the graph interly, also its percentage, so the remaining answers will be 100% in total… Is there another way to achieve that??

    Thank you very much again for your time, hope this is the last time I bother you with these questions!!!! ;-)

    Kind regards!!!

  • 5. Mark  |  April 23rd, 2006 at 3:54 pm

    In order to solve the problem you have to make a ‘missing case’ (in variable view) of the group you do not want to include in your graph. But do this before you create a table.
    For example; if you do not want to include the ategorie ’sattisfied’ in the graph, make this a missing case.

    Mark

  • 6. Els  |  April 24th, 2006 at 1:00 am

    Mark,

    thank you so much again!!!
    I am so glad I found this website!!!
    Keep up the good work!!!!

    Kind regards
    Els

  • 7. SAM  |  September 1st, 2006 at 12:13 pm

    Is there any way you can do this without the tables add-on? It should be an option in the spss menus for charts, but I just cannot find it….

  • 8. andris  |  September 9th, 2006 at 11:35 am

    SAM, I’m sorry, we don’t have the add-on, so we are not able to tell you. If someone else does, please let SAM know.

  • 9. Geert Mol  |  October 9th, 2006 at 8:46 am

    Is it possible to work this out with syntax? Or does it need to be done by hand. I have a very similar problem with presenting the data of the dutch prison survey in a compact form. The only problem I have to solve extra, is to figure out how to produce this kind of multiple variables into multiple stacked bar charts via syntax.
    Can this be done?

  • 10. Mark  |  October 9th, 2006 at 10:46 am

    It does need to be done by hand. We do not have a syntax for this.

  • 11. Geert Mol  |  October 10th, 2006 at 2:40 am

    thanks very much Mark for your quick reply!
    Doing this by hand is way to time consuming for my needs (52 locations with two or three reports per location).

    Anyone?
    Are there other possible solutions to this problem that can be done with syntax?

    It is a shame though that this is no standard option in SPSS
    I guess i’m stuck with Excel for the years to come

  • 12. Thomas  |  January 22nd, 2008 at 7:42 am

    How is that working with SPSS 16 for MAC? I cant figure it out, unfortunately

  • 13. andris  |  January 23rd, 2008 at 7:31 am

    Sorry Thomas,

    I don’t have a Mac available. Maybe you can ask your question at http://www.spssforum.com, possibly someone over there has experience with SPSS 16 and a Mac.

  • 14. Flavia  |  June 4th, 2008 at 9:22 am

    How does one get a stacked barchart in spss 16 for windows?

    thanks much for your help

  • 15. Alicia  |  August 12th, 2008 at 9:49 am

    Does anyone know how to then edit the labels from these charts? When I drew one it typed out the description of my data. If I remove teh description from the table SPSS types ‘empty’ as the label and I cannot alter this manually.

    Thank you!

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

April 2006
M T W T F S S
« Mar   May »
 12
3456789
10111213141516
17181920212223
24252627282930

Most Recent Posts