draw points using matplotlib.pyplot [[x1,y1],[x2,y2]]

You can do something like this:

a=[[1,2],[3,3],[4,4],[5,2]]
plt.plot(*zip(*a))

Unfortunately, you can no longer pass ‘ro’. You must pass marker and line style values as keyword parameters:

a=[[1,2],[3,3],[4,4],[5,2]]
plt.plot(*zip(*a), marker="o", color="r", ls="")

The trick I used is unpacking argument lists.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)