Labeling your datapointsΒΆ

This is an example of how to use the label(s) kwarg, which must be a list the length of the number of datapoints (rows) you have in the matrix. Here, we are simply labeling the first datapoint for each matrix in the list.

../_images/sphx_glr_plot_labels_001.png
# Code source: Andrew Heusser
# License: MIT

import hypertools as hyp
import scipy.io as sio
import numpy as np

data = hyp.tools.load('weights_sample')

labels=[]
for idx,i in enumerate(data):
    tmp=[]
    for iidx,ii in enumerate(i):
        if iidx==0:
            tmp.append('Subject ' + str(idx))
        else:
            tmp.append(None)
    labels.append(tmp)

hyp.plot(data, 'o', labels=labels)

Total running time of the script: ( 0 minutes 1.602 seconds)

Generated by Sphinx-Gallery