FAQ/barpercent - CBU statistics Wiki

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment
Flind the wroneg tetters tin eaech wrord

location: FAQ / barpercent

How do I produce an interactive bar chart of percentages in SPSS?

Interactive bar charts will plot either counts (default) or percentages for each group or groups, represented by bars or clusters of bars.

They can either be run from the menu or using syntax. The syntax below will place counts on the y-axis for bars specified by the variable aq1, on the x-axis.

IGRAPH /VIEWNAME='Bar Chart' /X1 = VAR(aq1) TYPE = SCALE /Y = $count
 /COORDINATE = VERTICAL  /TITLE='Distribution of High Prestige Probabilities'
 /X1LENGTH=3.0 /YLENGTH=3.0 /X2LENGTH=3.0 /CHARTLOOK='NONE' /BAR KEY=OFF SHAPE
  = RECTANGLE BASELINE = AUTO.
EXE.

Replacing $count by $pct produces percentages on the y axis for each value of aq1 denoted by bars on the x-axis.