COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### plot a graphic and identify each point with a label

• Follow

```Hi,
Example: I have 2 vectors (x,y) with size 10. I`d like to plot the graphic and identify each point with labels 1,...,10.
How can I do that?
Regards.
Douglas.
```
 0
Reply 11/23/2010 6:00:21 AM

```Douglas <douglas.miranda@gmail.com> wrote in message <1903058366.131769.1290510051858.JavaMail.root@gallium.mathforum.org>...
> Hi,
> Example: I have 2 vectors (x,y) with size 10. I`d like to plot the graphic and identify each point with labels 1,...,10.
> How can I do that?
> Regards.
> Douglas.

Hi Douglas:

You probably want the "text(...)" function.  See here:
http://www.mathworks.com/help/techdoc/creating_plots/f0-4741.html#f0-19466

You might also look at this article:
http://www.mathworks.com/help/techdoc/creating_plots/f0-41699.html#f0-41881

Note that the text( ) function places text in "graph space", which means that the text stays positioned relative to the data points when you do things like change the limits of the axes etc.

-- Graham
```
 0
Reply gwideman 11/23/2010 12:15:06 PM

```On 23/11/10 5:00 AM, Douglas wrote:

> Example: I have 2 vectors (x,y) with size 10. I`d like to plot the graphic and identify each point with labels 1,...,10.
> How can I do that?

Loop over the (x,y) pairs, text() the appropriate label at each pair.

```
 0
Reply Walter 11/23/2010 3:56:29 PM

2 Replies
377 Views

(page loaded in 0.16 seconds)

Similiar Articles:

7/29/2012 11:59:30 PM