# Label each point

Is it possible in Sage to label each point in a 2-D plot? I'd like to create something like this:

Label each point

Is it possible in Sage to label each point in a 2-D plot? I'd like to create something like this:

add a comment

1

```
f(x) = (x-2)^2-9
P = [(x0,f(x0)) for x0 in [-2..6]]
G = plot(f,-2,6)
G += points(P)
for p in P:
G += text(' (%s,%s)'%(p[0],p[1]),p,horizontal_alignment='left',color='red')
G.show()
```

Please start posting anonymously - your entry will be published after you log in or create a new account.

Asked: ** 2015-07-19 08:04:48 +0200 **

Seen: **1,972 times**

Last updated: **Jul 19 '15**

question about plotting points and calculating the average slope

Circle through three points (in 2D)

Elliptic Curve on FF points are expressed as 3 numbers?

division_polynomial with integer coefficients?!

how to get a log distribution on the x-axis of a semilogx plot?

curves in a plane, find intersecting points?

finding rational points on an elliptic curve

How do I create and plot a vector from the difference between two points?

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.