MBravoS / splotch

Simple PLOTs, Contours and Histograms is a small package with wrapper functions designed to simplify plotting calls from matplotlib.
BSD 3-Clause "New" or "Revised" License
4 stars 0 forks source link

Issue with legends with multiple splotch.curve() calls #58

Closed AstroRobin closed 3 years ago

AstroRobin commented 3 years ago

Only the last label is displayed in the legend when splotch.curve() is called multiple separate times for a given subplot. This probably has to do with the current legend functionality which may be overwriting any current labels being stored.

AstroRobin commented 3 years ago

Fixed as of 0.5.4.4. The new functionality of splotch.curve() is to only pass the automatically generated or user-defined labels into the plotting calls and to not perform the final plt.legend() call. This is because when passing handles and labels explicitly into plt.legend(), this overwrites any currently drawn legend as opposed to simply appending. There also seems to be no tidy solution for pulling the handles of a previous legend and appending to the newly created legends.