python - Splitting the legend in matploblib -


Is it possible to split the same big story into multiple (usually 2) small? YellowBiz import * T = range from (0.0, 2.0, 0.01) s = sin (2 * pi * t) plot (T, S, linewidth = 1.0, label = "graph1") grid ( True) s = sin (4 * pi * t) plot (T, S, color = 'r', linewidth = 1.0, label = "graph2") legend (public = 'bottom left') show ()

I would like to divide the mythology into two and place them where white space is available.

i pylab import * t = arange (0.0, 2.0, 0.01) s = sin (2 * pi) * T) p1, = get the answer from plot (t, s, linewidth = 1.0

 , label = "article 1") grid (True) s = sin (4 * pi * L2 = Legend: 1), ["graph 1"], public = 1), p2, = plot (t, s, color = 'r', linewidth = 1.0, label = "graph2") l1 = legend [p1], [ ([P2], ["graph2"], public = 4) gca (). AadAartist (L1) show ()   

Here, only one defect I have to give the label name twice.

Enter image details here

Comments