Check out example codes for "matplotlib pyplot legend location". It will help you in understanding the concepts better.

Code Example 1

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

Learn ReactJs, React Native from akashmittal.com