You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Applications are open for the 2018 John Hunter Matplotlib Summer Fellowship. Apply now!
Version 2.2.2.post1768+g23420a4c1
matplotlib
Fork me on GitHub

matplotlib.pyplot.figlegend

matplotlib.pyplot.figlegend(*args, **kwargs)[source]

Place a legend in the figure.

labels
a sequence of strings
handles
a sequence of Line2D or Patch instances
loc
can be a string or an integer specifying the legend location

A matplotlib.legend.Legend instance is returned.

Examples

To make a legend from existing artists on every axes:

figlegend()

To make a legend for a list of lines and labels:

figlegend( (line1, line2, line3),
           ('label1', 'label2', 'label3'),
           'upper right' )

See also

legend()