[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: newbie octave
From: |
viveks |
Subject: |
Re: newbie octave |
Date: |
Wed, 12 Apr 2000 10:47:48 +0530 (IST) |
On Wed, 12 Apr 2000, zakaria wrote:
> I've got the trouble to show the value or label on the contour and in
> plotting the graphics from the data. How to show the value or label on
> particular places on the contour that made by octave ?
I too had a similar requirement. Probably, neither octave nor gnuplot has
any built-in feature for this. However, you can use the "set label"
command of gnuplot from octave. after plotting the required curves.
Assume that you have matrices x(n), y(n), and z(n). While ( x(j), y(j) )
contain the data to be plotted on X-Y space, z(j) is the value at location
( x(j), y(j) ). Then you can use a code similar to this:
### ### ### ### ### ### ### ### ### ### ### ###
### I have not used contour plots. ## ###
### So, a simple data plot is shown here.## ###
### ### ### ### ### ### ### ### ### ### ### ###
plot(x,y);
for j = [1:n]
eval( sprintf("gset label \"%f\" at %f,%f center", z(j), x(j), y(j) ) ) ;
endfor
replot
### ### ### ### ### ### ### ### ### ### ### ###
R e g a r d s ,
Vivek...
-----------------------------------------------------------------------
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
-----------------------------------------------------------------------