Closed AstroRobin closed 3 years ago
splotch.curve()
no longer attempts to create legends during the call, rather it simply adds labels to each of the plot calls, relying on the user to create a legend afterwards. The idea here is that splotch.curve()
will only take care of the auto-generation of fancy handles and labels for the expression(s), but the creation and positioning of a legend object itself should be handled by plt.legend(), which allows this function to be used in conjunction with any other separate matplotlib/splotch call.
The current functionality of splotch.curve() means that when a legend is produced, it overwrites any legend that may already exist. Instead, splotch.curve() should extract any legend object that currently exists in the axis and append the created curves handles.
This issue may actually be present in several other functions that produce legends on the fly.