[Matplotlib-users] How to add number near point of scatter plot?

2013-04-06 Thread Zhu , Shenli
How to add number near point of scatter plot? e.g. I have two point 1 is (1,3) and point 2 (2,4), how can I add 1 and 2 to scatter plot near these two points? Thanks! import matplotlib.pyplot as plt x = [1,2] y = [3,4] plt.scatter(x, y) plt.show() ---

Re: [Matplotlib-users] How to add number near point of scatter plot?

2013-04-06 Thread Sterling Smith
See plt.text and plt.annotate See http://matplotlib.org/users/annotations_guide.html and references therein. -Sterling On Apr 6, 2013, at 3:54PM, Zhu, Shenli wrote: > How to add number near point of scatter plot? > e.g. I have two point 1 is (1,3) and point 2 (2,4), how can I add 1 > and 2 to

Re: [Matplotlib-users] How to add number near point of scatter plot?

2013-04-06 Thread Zhu , Shenli
Hi Sterling, thank you, I tried plt.text and it works! It seems text() does not support list input, and I have to write loop to print the number one by one. -- Minimize network downtime and maximize team effectiveness.