Code examples for the Python statistics course at the cogmaster.

Basic plotting example

Plotting quantities from a CSV file

Analysis of Iris petal and sepal sizes

Simple Regression

Multiple Regression

GLM fitting in fMRI

Cluster-size permutation in fMRI

Please refer to http://scipy-lectures.github.io/intro/matplotlib/matplotlibmatplotlib.html for a tutorial on using matplotlib.

Examples here are adapted from examples written by Nicolas Rougier for the scipy-lectures.

Regular plots

Multiple plots with ‘subplot’

Bar plot demo

Imshow demo

Scatter plots

Contour plot demo

Pie plots

Text

Relating Gender and IQ

Time series of conditions and scans