.. _sphx_glr_auto_examples_plot_labels.py: ============================= 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. .. image:: /auto_examples/images/sphx_glr_plot_labels_001.png :align: center .. code-block:: python # Code source: Andrew Heusser # License: MIT # import import hypertools as hyp import numpy as np # load example data geo = hyp.load('weights_sample') data = geo.get_data() # 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 geo.plot(fmt='.', labels=labels) **Total running time of the script:** ( 0 minutes 0.136 seconds) .. only :: html .. container:: sphx-glr-footer .. container:: sphx-glr-download :download:`Download Python source code: plot_labels.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: plot_labels.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_