[Top][All Lists]

[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
( ) 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,


## 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)));
   for n = [1:rows(x)]
      eval(sprintf("gset label \"%d\" at %f,%f center",x(n,3),x(n,1),x(n,2)));



Octave is freely available under the terms of the GNU GPL.  To ensure
that development continues, see
Instructions for unsubscribing:

reply via email to

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