matplotlib 2d line line,=plot comma meaning

plt.plot returns a list of the Line2D objects plotted, even if you plot only one line.

That comma is unpacking the single value into line.

ex

a, b = [1, 2]
a, = [1, ]

Leave a Comment