How to make two markers share the same label in the legend using matplotlib?
What I want is like this: What I get is this: So how to merge the markers into one label? also for the lines, for the lines, of course, u can realize it by not assigning label to the second line while using the same linetype, but for the markers, you can not, since they are of different shapes. I think it's best to use a full legend - otherwise, how will your readers know the difference between the two models, or the two datasets? I would do it this way: But, if you really want to do it your way, you can use a custom legend as shown in this guide . You'll need to create your own class, like