Note
Go to the end to download the full example code.
Labeling your datapoints¶
run this example as a notebook — or grab the .ipynb (also linked at the bottom of the page)
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.

/home/docs/checkouts/readthedocs.org/user_builds/hypertools/checkouts/latest/hypertools/plot/backend.py:1353: UserWarning: Failed to switch to any interactive backend (TkAgg, QtAgg, Qt5Agg, Qt4Agg, GTK4Agg, GTK3Agg, WXAgg). Falling back to 'Agg'.
warnings.warn(BACKEND_WARNING)
# Code source: Andrew Heusser
# License: MIT
# import
import hypertools as hyp
import numpy as np
# load example data
data = hyp.load('weights_sample')
# simulate labels
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)
# plot
hyp.plot(data, fmt='.', labels=labels)
Total running time of the script: (0 minutes 0.136 seconds)