[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Contour
From: |
viveks |
Subject: |
Re: Contour |
Date: |
25 Oct 1999 06:40:10 GMT |
address@hidden asked on the GnuPlot newsgroup:
> Could anyone show me how to add the keys of each contour level onto the
> contour levels directly instead of having them set aside by the contour
> plot?
I think you may have to do it manually in case you do it only with Gnuplot.
However, there is a MatLab clone called Octave
( http://www.che.wisc.edu/octave/ ) that uses GnuPlot for all plotting. As
Octave is a programming language, a few lines of Octave code can allow you to
place a string at the desired location. What follows is one such script
written by me that types in an integer z at (x,y) on the plot.
If you want to print a string 'z' at (x,y), you may have to modify the script
accordingly. I have listed the code below...
Best wishes,
Vivek...
----------------------------------------------------------------
## usage: put_label (x, y, z) or put_label (x)
##
## Set label z at (x,y) onto an existing plot
##
## See also: plot
## Author: viveks
## Date: 21/10/99
function put_label(x, y, z)
if (nargin == 3)
for n = [1:rows(x)]
eval(sprintf("gset label \"%d\" at %f,%f center", z(n), x(n), y(n)));
endfor
else
for n = [1:rows(x)]
eval(sprintf("gset label \"%d\" at %f,%f center",x(n,3),x(n,1),x(n,2)));
endfor
endif
endfunction
----------------------------------------------------------------
---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL. To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |