Creating Histograms in SPSS
Among the very best SPSS practices is running histograms over your metric variables. Doing so is a super fast way to detect problems such as extreme values and gain a lot of insight into your data. This tutorial quickly walks you through using bank_clean.sav, part of which is shown below.
Option 1: FREQUENCIES without Frequency Tables
*/format notable suppresses (huge) frequency tables.
Multiple Histograms in One Go
Running histograms like this does not allow you to use custom titles for your charts. However, it does allow running many histograms in one go as shown below. Oddly, doing so results in variable labels being used as chart titles instead of “Histogram” in our first example.
frequencies whours to overall
Option 2: GRAPH
If you'd like to include one or more histograms in your report, you probably need somewhat prettier charts. Creating a GRAPH command from the menu -as shown below- allows us to set nice custom titles and makes it easier to style our charts with an SPSS chart template.
SPSSdialogs for charts contain way more charts than most users are aware of and generate much nicer, cleaner syntax than the .
We'll choose “All Respondents | n = 464” as our main title here because this is relevant but far from obvious.
/TITLE='All Respondents | n = 464'.
The result still looks pretty much the same. We'll fix that next.
Styling our Histogram
Last but not least, we'll style our histogram. If we save our styling as a chart template, we can easily apply it to all subsequent histograms, which may save us a lot of time. Like so, our final syntax example uses “histogram-nosum-title-720-1.sgt”. (“.sgt” is short for “SPSS Graph Template” but the file is referred to as a chart template.)
If this file is absent, SPSS will throw a warning and still run our histogram with whatever default template -if any- has been set.
SPSS Histogram Syntax with Template
/TITLE='All Respondents | n = 464'
So that's basically it. We could discuss some more options but we don't find them useful in practice, so we'd rather keep it short this time.
We hope you found this tutorial helpful. Thanks for reading!