Matplotlib was designed to provide a Matlab like environment within Python, when using the matplotlib plots it is convenient to have the rest of matplotlib available. Matplotlib is one package that CompClust depends on, and it can be obtained from http://matplotlib.sourceforge.net. First we will import the matplotlib package into our shell:
from matplotlib.pylab import *
Both classes, pcaGinzu and pcaGinzuVisualizeMatplotlib, share the same constructor, so they take the same list of parameters, e.g. the dataset to operate on, the outlierCutoff or nOutliers number of high and low outliers, the significance threshold, and what is the highest numbered principal component to analyze.
The following function call creates a PCAGinzu object using the Cho dataset, this time using nOutliers=10 and sigCutoff=0.01:
pcaginzu = pcaGinzu.pcaGinzuVisualizeMatplotlib(cho, nOutliers=10, sigCutoff=0.01)
Note: Again, an incredibly important difference between the previous IPlot-based functions and the following matploglib-based functions is that in the matplotlib functions the principal component numbers use 1-based indexing. That is, the first principal component is 1, the second is 2, etc.