0

Good Morning more advanced users of SPSS and R!

Both SPSS and R run their advanced data visualizations using GPL (Graphics Production Language). I happen to be using SPSS, but I suspect an R user may have an answer.

I have five categorical variables (a, b, c, d, e) each with three identical levels (1, 2, 3).

My goal is to create one graph that either stacks my variables by category:

Y axis: percent

X axis: a1b1c1d1e1 a2b2c2d2e2 a3b3c3d3e3

OR even more valuable would be simply to only include the one category that is actually interesting for comparison:

Y axis: percent

X axis: a2 b2 c2 d2 e2

I can kind of do this by creating a custom table that summarizes the percent totals for each variable (column percents) and then selecting the cells in the output table and right clicking to create a bar graph. However, I like the customization I can do in the GPL such as adding labels of the percent values, easy adjustment of titles and the ability to easily repeat the effort at a later time.

I'm re-reading a GPL SPSS manual but it came from an odd source and not IBM's website so it may be outdated. However, in case you do this in your work, I thought I'd reach out for a suggestion.

Too bad I can't just use my crayons!

  • "Both SPSS and R run their advanced data visualizations using GPL." GPL = GNU General Public License??? – Roland Nov 24 '20 at 13:43
  • Graphics Production Language (GPL) – Meghan Donahue Nov 24 '20 at 15:17
  • Please remove the R tag. – Roland Nov 24 '20 at 15:21
  • As @Roland suggests, your premise that R uses the Graphics Production Language just isn't true (at least as far as I know), so the [r] tag isn't relevant. Neither is the [gpl] tag, since (on Stack Overflow) it refers to the General Public License, not the Graphics Production Language ... – Ben Bolker Nov 24 '20 at 15:33
  • R's ggplot and SPSS's GGraph both use the Grammar of Graphics which GPL is built on. If there is a way to do it in R, with ggplot, then it can be converted to be done in SPSS. – Meghan Donahue Nov 24 '20 at 16:22
  • 1
    OK. Can you give a [mcve] please? I'm afraid that an R-based solution might not generalize, as one would probably pre-process the data to get it in the right shape etc.... – Ben Bolker Nov 24 '20 at 23:03

0 Answers0