diff scripts/plot/contour.m @ 3131:9c5160c83bd2

[project @ 1998-01-29 04:46:33 by jwe]
author jwe
date Thu, 29 Jan 1998 04:46:36 +0000
parents 4287b8c06fbf
children af7ec9d3a5e6
line wrap: on
line diff
--- a/scripts/plot/contour.m
+++ b/scripts/plot/contour.m
@@ -39,7 +39,15 @@
       gset nosurface;
       gset contour;
       gset cntrparam bspline;
-      command = sprintf ("gset cntrparam levels %d", n);
+      if (is_scalar (n))
+	command = sprintf ("gset cntrparam levels %d", n);
+      elseif (is_vector (n))
+	tmp = sprintf ("%f", n(1));
+	for i = 2:length (n)
+	  tmp = sprintf ("%s, %f", tmp, n(i));
+	endfor
+	command = sprintf ("gset cntrparam levels discrete %s", tmp);
+      endif
       eval (command);
       gset noparametric;
       gset view 0, 0, 1, 1;
@@ -67,7 +75,15 @@
         gset nosurface;
         gset contour;
         gset cntrparam bspline;
-        command = sprintf ("gset cntrparam levels %d", n);
+	if (is_scalar (n))
+          command = sprintf ("gset cntrparam levels %d", n);
+	elseif (is_vector (n))
+	  tmp = sprintf ("%f", n(1));
+	  for i = 2:length (n)
+	    tmp = sprintf ("%s, %f", tmp, n(i));
+	  endfor
+	  command = sprintf ("gset cntrparam levels discrete %s", tmp);
+	endif
         eval (command);
 	gset parametric;
         gset view 0, 0, 1, 1;