help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: plotting and text in a for loop


From: Paul Kienzle
Subject: Re: plotting and text in a for loop
Date: Sat, 5 Aug 2000 18:03:32 +0100 (BST)

Try:
        n=5; 
        x=rand(n,3); 
        for i=1:n; 
            eval(sprintf('gset label "%d" at first %f,%f',i,x(i,2),x(i,3))); 
        end; 
        plot(x(:,2),x(:,3),".;;");

From: Michele <address@hidden>
>I need to write text in a plot.
>I draw some points and lines connected to these points from two data
>files.
>I need to write a text in that plot.
>What i need is to write for each point its number and for each lines its
>number.
>
>I have tried to do this with a for loop:
>
>for i=1:n
>    gset label i at geom0(i,2),geom0(i,3);
>endfor
>
>Where geom0 is the matrix containg the coordinates of points.
>
>But as you can image this does,t work.
>
>Are there any possibilities ?
>
>Thank you.
>Michele.
>
>
>
>-----------------------------------------------------------------------
>Octave is freely available under the terms of the GNU GPL.
>
>Octave's home on the web:  http://www.che.wisc.edu/octave/octave.html
>How to fund new projects:  http://www.che.wisc.edu/octave/funding.html
>Subscription information:  http://www.che.wisc.edu/octave/archive.html
>-----------------------------------------------------------------------
>
>
>



-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.che.wisc.edu/octave/octave.html
How to fund new projects:  http://www.che.wisc.edu/octave/funding.html
Subscription information:  http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]