From: Zhu, S. <zhu...@gm...> - 2013-04-06 23:00:13
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()
From: Sterling S. <sm...@fu...> - 2013-04-07 04:39:14
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 scatter plot near these two points? Thanks!
>
> import matplotlib.pyplot as plt
> x = [1,2]
> y = [3,4]
> plt.scatter(x, y)
> plt.show()
>
>
>
> ------------------------------------------------------------------------------
> Minimize network downtime and maximize team effectiveness.
> Reduce network management and security costs.Learn how to hire
> the most talented Cisco Certified professionals. Visit the
> Employer Resources Portal
> http://www.cisco.com/web/learning/employer_resources/index.html
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Zhu, S. <zhu...@gm...> - 2013-04-07 06:14:51
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.