Generating a legendΒΆ

An example of how to use the legend kwarg to generate a legend.

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

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

data=sio.loadmat('sample_data/weights.mat')
w=[i for i in data['weights'][0][0:2]]

hyp.plot(w,'o', legend=['Group A', 'Group B'])

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

Generated by Sphinx-Gallery