SPSS Statistics

 View Only

Shape, color, and pattern constants in SPSS Statistics charts

By Archive User posted Tue April 26, 2016 04:38 PM

  

I have a version of the SPSS (Statistics) Version 24 GPL reference guide bookmarked here. The reference guide is great to skim through and see what is possible in SPSS charts - especially the set of examples on pages 329 to 411.


On page 413 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.red or color.pink etc. 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! (The tomato is more like tomato soup color.)


Here are the color constants (you can open the chart in a new tab to see a larger image):





The shape constants:





The elbow and the elbowArrow do not look correct - but will take some more time to investigate. The others look ok 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 charts, and 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. I haven't used dashed lines ever, so I omit those constants here. (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. They are just currently in alphabetical. I am too lazy though to convert the colors to a colorspace and sort them though. (Maybe converting the PDF to SVG would do the trick easy enough though.)







#datavisualization
#SPSS
#SPSSStatistics
#Visualization
2 comments
1 view

Permalink

Comments

Fri December 16, 2016 01:56 PM

Sorry, playing around with it I was unable to get it to do horizontal lines either. (I played with the chart template a bit to see if that would do it, you can rotate glyphs.)

You might be able to hack your own by stacking the lines yourself, see

- https://andrewpwheeler.wordpress.com/2013/08/01/using-circular-dot-plots-instead-of-circular-histograms/
- https://andrewpwheeler.wordpress.com/2014/10/02/stacking-intervals/

for motivating examples.

Orientation should be a settable and mappable element in the grammar of graphics IMO, but it is not in either SPSS's or ggplot for R.

Mon December 12, 2016 03:55 PM

Thx alot for this info.
I have a small problem that you might have a solution to. when i use this function in a dot graph
ELEMENT: point.dodge.symmetric(position(summary.mean(Treatment*exp_rnd)), shape.interior(shape.line), size(size."24px), color(color.black))
The line points upwards like the elbow and not horizontally. Do you know what could be wrong?