so I am working with a Python package (Pycalphad) which uses matplotlib.patches for plotting the legend of diagrams. These patches contain the colors and respective labels.
In the package, the entries are defined as (mpatches.Patch(color=colorlist[phase], label=phase)), with phase being a changing variable.
If I wanna read one of the legend entries, I only get back <matplotlib.patches.Patch at 0x14e5373f108>.
I would prefer not to change the code of the package and rather work with what I got.
So is there a way to extract the information contained in the Patches and getting the colors and labels used in the definition of the patch?
Help would be highly appreciated!