How to add bar and line under the same label in a legend?
问题 I made a plot with 2 Y axes, where one has a bar chart and the other one lines and I would like to add a common legend for both plots. If I add the following: axis1.legend([(bar1, line1), (bar2, line2)], ['Solution 1', 'Solution 2'], loc='upper left', numpoints=1) I almost get what I want, except for the markers / artists (not sure which term is suitable here), which are overlapping for both solutions as seen here: Is it possible to have the bar artist first and the line artist second, side