Skip to content

Plots

study.plot draws values and results with plain Matplotlib. Every view returns a Plot that unpacks as fig, ax and keeps the numbers it drew (plot.data, plot.points) and its artists by layer.

Data views

box, violin, bar, point, strip, line, scatter, distribution, histogram, ecdf, agreement (Bland–Altman), by variable name:

study.plot.violin("error", x="method", subset={"sensors": "eeg"})                 # every source of every subject
study.plot.box("error", x="method", subset={"sensors": "eeg"}, unit="subject")   # one value per subject

Dimensions and levels not on the axes are pooled, and the figure says so in its title ("8,664 values from 16 subjects, pooled over source"); unit= collapses to one value per unit first. interval="ci" is the same interval q.estimate reports.

Result views

r.plot() draws the usual figure of a result; study.plot has the others:

View Draws
comparison(r) the groups, each unit joined in a paired design, brackets on significant pairs
differences(r) the per-unit differences, bootstrap draws or difference curves behind a test
along(r) curves with a bar under each significant cluster
estimate(r) / estimate([r1, r2, ...]) estimates with intervals; a forest of several results
normality(r) densities, histograms or Q–Q plots, with the test's p
omnibus(r) the groups and the omnibus verdict

A result view first checks that the data its question reads haven't changed since the result was computed, and refuses otherwise: a figure always shows the data that was tested.

Style

syn.plot.set_style(fontsize=8, palette=...) (or with syn.plot.style(...)) applies to every figure. A group's colour is its position among all the groups of the study, so it is the same in every figure, whatever is drawn. See tutorial 13.