changeset 21522:27f2881598fa

ribbon: do not make a special case out of single column Y. * plot/draw/ribbon.m: if Y has a single column, then we plot a single ribbon. Do not treat it different. For example, try "ribbon ([1; 2], [1; 2])" which should be a single ribbon.
author Carnë Draug <carandraug@octave.org>
date Tue, 22 Mar 2016 17:57:28 +0000
parents 02cbd95095cc
children 86d8801a14dd
files scripts/plot/draw/ribbon.m
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/draw/ribbon.m	Tue Mar 22 17:22:00 2016 +0000
+++ b/scripts/plot/draw/ribbon.m	Tue Mar 22 17:57:28 2016 +0000
@@ -67,9 +67,9 @@
   if (isvector (x) && isvector (y))
     if (length (x) != length (y))
       error ("ribbon: vectors X and Y must have the same length");
-    else
-      [x, y] = meshgrid (x, y);
     endif
+    x = x(:);
+    y = y(:);
   else
     if (! size_equal (x, y))
       error ("ribbon: matrices X and Y must have the same size");