How to plot legend while using LineCollection?

i have call the set_label() method of LineCollection
but still can't get the legend

some one knows how to plot legend while using LineCollection?

I have just create a LineCollection, it's work well affter adding to axes
But I can't get the right output while want to add the legend to the
lines collection,

I try the axes's get_lines() method but get a "NULL" Line2D instants
I think this is why the legend() func can't work,
But how can I make the collection of lines legend?
many thanks!

I write the code like this:

ax = axes()
line_collection = LineCollection(...)
ax.add_collection(line_collection)
legend(some_label) # can't work
show()

ยทยทยท

On 12/18/05, Henotii <henotii@...287...> wrote:

i have call the set_label() method of LineCollection
but still can't get the legend

some one knows how to plot legend while using LineCollection?