label_contours.awk: obsolete syntax, both in the script and on the homepage

label_contours.awk: obsolete syntax, both in the script and on the homepage

Post by Per Juh » Tue, 30 Jun 2009 22:43:57


I'm trying to create plots where contour labels are placed next to the
contours themselves.
I've found *label_contours.awk* on the gnuplot.info web page, and --
after some tweaking-- it's doing its job.

However, I've noticed that the script generates a gnuplot plot script
that uses deprecated syntax.
Namely, the line that actually makes the final plot looks like this:


instead of this:

My self-compiled gnuplot 4.3 croaks on the original version.

The information that accompanies the awk script on the home page is
also obsolete:
"Example of use (from gnuplot):

set contour base; set cntrparam levels 15; unset surface
set term table; set out "contour.dat"
splot x*x+y*y
set out; set term pop
!awk -f label_contours.awk -v nth=10 textcolor=-1 inclt=1
contour.dat >tmp.gp
reset; load 'tmp.gp'"

'set term table' is not recognized anymore by current gnuplot
versions; 'set table "contour.dat"' seems to be the correct version.

Maybe the script and the home page should be updated to use current
syntax.

Best regards,
Per Juhz