#StackBounty: #python #matplotlib #legend How to produce nested legends in Matplotlib

Bounty: 50

I have to plot in Matplotlib a quantity which is the sum of various contributions.

I would like to highlight this fact in the legend of the plot by listing the various contribution as sub-elements of the main legend entry.

A sketch of the result I would like to obtain can be found in the picture below. Note that I do not need to necessarily achieve exactly the legend that is depicted, but just something similar.



Get this bounty!!!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.