On 12.09.2014 20:01, ConcreteVitamin wrote: > Accidentally hit send, sorry.. Completed email: > > I have a graph that looks like this [1], in which each line has > different markers for the same number of points. I'd like to add a > separate "legend box" (like the one already in the graph) for the > markers only: > > <circle>: description for circle > <right triangle>: description for right triangle > ... and so on... > > How can I do this? After googling a bit I couldn't find an answer. Thanks a > lot!
The plt.legend docstring says To make a legend for a list of lines and labels:: legend( (line1, line2, line3), ('label1', 'label2', 'label3') ) So I would try something along the lines of # plot lines line1 = ax.plot(...) ... linen = ax.plot(...) lineleg = ax.legend((line1, ..., linen), ('linelabel1', ...)) # plot symbols symb1 = ax.plot(...) ... symbn = ax.plot(...) symbleg = ax.legend((symb1, ..., symbn), ('symblabel1', ...)) Cheers, Andreas > > > On Fri, Sep 12, 2014 at 11:00 AM, ConcreteVitamin > <concretevita...@gmail.com> wrote: >> Hi matplotlib-users@, >> >> I have a graph that looks like this [1], in which each line has >> different markers for the same number of points. I'd like to add a >> separate "legend box" (like the one already in the graph) for the >> markers only: >> >> <circle>: description for circle >> <right triangle>: description for right triangle >> >> >> [1] http://imgur.com/tmFpix1 > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- -- Andreas. ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users