StatFas.com

How to Make a Parallel Coordinates Plot in StatFas, SPSS, R, Python and MATLAB

By StatFas · Updated 2026-11-09

This tutorial draws the same parallel coordinates plot, with an ANOVA for each variable, in five tools. The example table has one row per patient, a group column (Placebo, Low dose, High dose) and six clinical variables.

Open the free Parallel Coordinates Plot GeneratorRead the full guide

What you will make

A publication-ready parallel coordinates plot with the compulsory checks and statistics that go with it, produced in five ways. The StatFas generator needs no coding and no account to run; the code versions are for readers who want a scripted workflow. For the theory behind the plot and how to read it, see the full guide.

Example data

ColumnContents
groupPlacebo, Low dose or High dose
sbp, dbp, heart_rateBlood pressure and pulse
cholesterol, glucose, bmiLaboratory and body measures

Save your table as parallel.csv with a header row. The StatFas generator has a Load Example Data button with simulated data, so you can follow along without your own file. The example data are invented for illustration and are not real findings.

Method 1: StatFas (free, no coding)

  1. Open the Parallel Coordinates Plot Generator and click Load Example Data, or paste/upload your own file.
  2. Choose the variables and the group column, set Axis scaling (standardized is a good default) and Axis order (by η² puts the most different variables together).
  3. Run the analysis. Read the ANOVA table (F, df, p, Holm-adjusted p, η²), the group means table and the figure interpretation.
  4. Change colors, line widths, fonts and sizes in the figure style panel.
  5. Log in (free) to download the figure (PNG or SVG), tables (CSV) and a Word report with APA7 interpretations.
Analysis needs no login. Downloads of figures, tables and Word reports need a free StatFas account.

Method 2: SPSS

SPSS has no parallel coordinates chart, so the figure has to be drawn elsewhere. You can run the per-variable ANOVAs in SPSS with Analyze > Compare Means > One-Way ANOVA and a Bonferroni or Tukey post hoc test, then draw the plot in R, Python or StatFas. Syntax for the tests:

ONEWAY sbp dbp heart_rate cholesterol glucose bmi BY group
  /STATISTICS DESCRIPTIVES HOMOGENEITY
  /POSTHOC=TUKEY ALPHA(0.05).

SPSS does not apply a family-wise correction across the six variables. Adjust the p-values yourself (for example Holm) or use StatFas, which reports them.

Method 3: R

library(GGally); library(ggplot2)
df <- read.csv("parallel.csv"); df$group <- factor(df$group)

ggparcoord(df, columns = 2:7, groupColumn = 1, scale = "std", alphaLines = 0.35) +
  theme_classic() + labs(x = NULL, y = "z-score")
ggsave("parallel.png", width = 7, height = 4.5, dpi = 300)

res <- do.call(rbind, lapply(names(df)[-1], function(v) {
  a <- summary(aov(df[[v]] ~ df$group))[[1]]
  data.frame(variable = v, F = a$`F value`[1], df1 = a$Df[1], df2 = a$Df[2],
             p = a$`Pr(>F)`[1], eta2 = a$`Sum Sq`[1] / sum(a$`Sum Sq`))
}))
res$p_holm <- p.adjust(res$p, method = "holm")
res

Packages: install.packages(c("GGally","ggplot2")). scale = "std" gives z-scores; use "uniminmax" for min–max scaling.

Method 4: Python

import pandas as pd, matplotlib.pyplot as plt
from pandas.plotting import parallel_coordinates
from scipy import stats

df = pd.read_csv("parallel.csv")                 # group + 6 numeric variables
vars_ = [c for c in df.columns if c != "group"]
z = df.copy(); z[vars_] = (df[vars_] - df[vars_].mean()) / df[vars_].std()   # z-score axes

ax = parallel_coordinates(z, "group", colormap="Set1", alpha=0.35)
ax.set_ylabel("z-score"); plt.xticks(rotation=30); plt.tight_layout(); plt.savefig("parallel.png", dpi=300)

# One-way ANOVA per variable, Holm-adjusted, with eta squared
rows = []
for v in vars_:
    groups = [d[v].values for _, d in df.groupby("group")]
    F, p = stats.f_oneway(*groups)
    k, N = len(groups), len(df); eta2 = F * (k - 1) / (F * (k - 1) + N - k)
    rows.append((v, F, k - 1, N - k, p, eta2))
res = pd.DataFrame(rows, columns=["variable", "F", "df1", "df2", "p", "eta2"])
order = res["p"].argsort().values; m = len(res); adj = [0] * m; run = 0
for rank, i in enumerate(order):
    run = max(run, min(1, (m - rank) * res["p"].iloc[i])); adj[i] = run   # Holm step-down
res["p_holm"] = adj
print(res.round(4))

Requires pandas, scipy and matplotlib. The loop applies the Holm step-down adjustment by hand; statsmodels.stats.multitest.multipletests(p, method="holm") does the same.

Method 5: MATLAB, OriginPro, Excel and others

MATLAB

T = readtable("parallel.csv"); X = zscore(T{:, 2:end});
parallelcoords(X, "Group", T.group, "Labels", T.Properties.VariableNames(2:end));
[p, tbl] = anova1(T.cholesterol, T.group);

OriginPro / Excel

OriginPro has a parallel coordinates plot among its specialized plot types (menu names vary by version). Excel has no native parallel coordinates chart; a line chart with one series per case on pre-scaled columns gives a rough equivalent.

Which method should you choose?

ToolCost and skillPlotStatistical checksReport-ready output
StatFasFree, in the browserYes (group means, ordering)ANOVA, Holm, η²Yes, to Word
SPSSLicence neededNoANOVA yes; no multi-variable correctionTables only
RFree, codingYes (GGally)Manual loopManual
PythonFree, codingYes (pandas)Manual loopManual

Choose StatFas for speed and APA7-ready output, SPSS if your department already licenses it and you only need the statistics, and R or Python when the analysis must be scripted and reproduced in a pipeline.

How to report the result in APA7

Report the scaling in the figure note and give one line per variable that differs: F(df₁, df₂), the adjusted p and η². Name the correction (Holm or Benjamini–Hochberg). StatFas writes this paragraph and the ANOVA table for you.

See the guide for an example paragraph.

Troubleshooting

Frequently asked questions

Can SPSS make a parallel coordinates plot?

Not as a built-in chart. Use R, Python, MATLAB, OriginPro or StatFas for the figure.

Do I need coding skills?

No. The StatFas generator works from a pasted or uploaded table.

Try it now. Run the analysis in your browser with the free Parallel Coordinates Plot Generator. No account is needed to analyze; a free StatFas account is needed only to download figures, tables and the Word report.

Related tools, guides and tutorials

References

  1. American Psychological Association. (2020). Publication manual of the American Psychological Association (7th ed.).
  2. Benjamini, Y., & Hochberg, Y. (1995). Controlling the false discovery rate: A practical and powerful approach to multiple testing. Journal of the Royal Statistical Society B, 57(1), 289–300.
  3. Holm, S. (1979). A simple sequentially rejective multiple test procedure. Scandinavian Journal of Statistics, 6(2), 65–70.
  4. Inselberg, A. (1985). The plane with parallel coordinates. The Visual Computer, 1(2), 69–91.
  5. Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Lawrence Erlbaum Associates.