Thomas Lumley on his blog had a recent example of remaking a clustered bar chart that I thought was a good idea. Here is a screenshot of the clustered bar chart the original is here:. In the original bar chart it is hard to know what is the current value and what are the past values. The grammar of graphics I always thought is alittle confusing when using so this will be a good example demonstration.
Instead of worrying about the legend I just added in text annotations to show what the particular elements were. One additional remake is instead of offsetting the points and using a slope chart this is an ok use, but see my general critique of slopegraphs here is to use a simpler dotplot showing before and after.
One reason I do not like the slopes is that slope itself is dictated by the distance from 16 to 17 in the chart which is arbitrary. If you squeeze them closer together the slope gets higher. The slope itself does not encode the data you want, you want to calculate the difference from beginning to end. But it is not a big difference here my main complaints for slopegraphs are when you superimpose many different slopes that cross one another, in those cases I think a scatterplot is a better choice.
Jonathan Schwabish on blog often has similar charts Transparent google search xdating this one example.
Pretty much all clustered bar charts can be remade into either a dotplot or a line graph. Here like Lumley said instead of showing the ranges likely a better chart would just be a line chart over time of the individual years, that would give a better since of both trends as well as typical year-to-year changes.
But these alternatives to a clustered bar chart I do not think turned out too shabby. One aspect of SPSS charts that you need to use syntax for is to create side-by-side charts. Here I will illustrate a frequent use case, time series charts with different Y axes. You can download the data and code to follow along here.
So after you have downloaded the csv file with the UCR crime rates in Buffalo and have imported the data into SPSS, you can make a graph of violent Transparent google search xdating rates over time. I like to superimpose the points on simple line chartsto reinforce where the year observations are. Here we can see that there is a big drop post for the following four years something that would be hard to say exactly without the points.
Now we want to place these two charts over top of one another. These paddings are needed to make room for Transparent google search xdating axis labels. So this shows how to make the violent crime chart take a bigger proportion. You can technically do charts with varying axes in SPSS without this, but you would have to make the panels take up an equal amount of space. This way you can make the panels whatever proportion you want. For Buffalo the big drop in is largely due to a very large reduction in aggravated assaults from over 3, in to under 1, in So here I superimpose Transparent google search xdating bar to viz.
While doing multiple time series charts is a common use, you can basically use your imagination about what you want to accomplish with this. Another common example is to put border histograms on scatterplot which the GPL reference guide has an example of.
Here is an example I posted recently to Nabble that has the number of individuals at risk in a Kaplan-Meier plot. The reference guide is great to skim through and see what is possible in SPSS charts — especially the set of examples on pages to On page they also give a set of constant colors, shapes, and texture patterns you can use in charts.
Colors you can also specify in RGB scale, but it is often convenient to just say color. Shapes and patterns for practical purposes you have to choose among the constants. Technically in the chart template you can edit the cycle styles, and change a circle to an ellipse for example, or change the points for a dash pattern, but this would be painful for anything besides a few constants. Here is a handy reference guide to actually visualize those constants.
Many you can guess what they look like, but the colors are more subtle. Who knew there were differences between tomato, salmon, and pink! tomato is more like tomato soup color. The elbow Transparent google search xdating the elbowArrow do not look correct — but will take some more time to investigate.
The others look to me though. The number of sides and star points appear to me to be something you can also manipulate in the chart template cycles, if for some reason you want a hendecagon.
And here are the pattern constants. I plot them with a grey filled interior — you can see some specifically only have an outline and always have a transparent fill:.
Here is code to replicate the chartsand here is a PDF to download with the constants. The colors and shapes are hard to read because they are squeezed in so small, but you can zoom into the PDF and read the categories. Patterns I use pretty rarely, but I have used them if there are only two categories. A useful change for the colors would be sorting in a logical order.