changeset 22161:9babcd597676

Visual differences between Octave and Matlab (bug #48572) * datetick.m: Use Matlab syntax in demo. Slight changes to docstring. * shrinkfaces.m: Use syntax that works around Matlab bug. * trisurf.m: Remove unnecessary formatting which was not compatible to Matlab.
author Markus Mützel <markus.muetzel@gmx.de>
date Wed, 20 Jul 2016 20:44:21 +0200
parents 766f934db568
children e50536734855
files scripts/plot/appearance/datetick.m scripts/plot/draw/shrinkfaces.m scripts/plot/draw/trisurf.m
diffstat 3 files changed, 13 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/appearance/datetick.m	Sun Jun 26 13:32:03 2016 +0200
+++ b/scripts/plot/appearance/datetick.m	Wed Jul 20 20:44:21 2016 +0200
@@ -18,19 +18,21 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {} {} datetick ()
-## @deftypefnx {} {} datetick (@var{form})
-## @deftypefnx {} {} datetick (@var{axis}, @var{form})
+## @deftypefnx {} {} datetick (@var{date_format})
+## @deftypefnx {} {} datetick (@var{axis_str}, @var{date_format})
 ## @deftypefnx {} {} datetick (@dots{}, "keeplimits")
 ## @deftypefnx {} {} datetick (@dots{}, "keepticks")
 ## @deftypefnx {} {} datetick (@var{hax}, @dots{})
 ## Add date formatted tick labels to an axis.
 ##
-## The axis to apply the ticks to is determined by @var{axis} which can take
-## the values @qcode{"x"}, @qcode{"y"}, or @qcode{"z"}.  The default value is
-## @qcode{"x"}.
+## The axis to apply the ticks to is determined by @var{axis_str} which can
+## take the values @qcode{"x"}, @qcode{"y"}, or @qcode{"z"}.  The default
+## value is @qcode{"x"}.
 ##
-## The formatting of the labels is determined by the variable @var{form}, which
-## can either be a string or positive integer that @code{datestr} accepts.
+## The formatting of the labels is determined by the variable
+## @var{date_format}, which can either be a string or positive integer that
+## @code{datestr} accepts.
+##
 ## @seealso{datenum, datestr}
 ## @end deftypefn
 
@@ -81,7 +83,7 @@
 %! ylabel ('average price');
 %! ax = gca;
 %! set (ax, 'xtick', datenum (1990:5:2005,1,1));
-%! datetick (ax, 'x', 'keepticks');
+%! datetick ('x', 2, 'keepticks');
 %! set (ax, 'ytick', 12:16);
 
 ## Remove from test statistics.  No real tests possible.
--- a/scripts/plot/draw/shrinkfaces.m	Sun Jun 26 13:32:03 2016 +0200
+++ b/scripts/plot/draw/shrinkfaces.m	Wed Jul 20 20:44:21 2016 +0200
@@ -197,7 +197,7 @@
 %! N = 10;  % N intervals per axis
 %! [x, y, z] = meshgrid (linspace (-4,4,N+1));
 %! val = x.^3 + y.^3 + z.^3;
-%! fv = isosurface (x, y, z, val, 3, z);
+%! fv = isosurface (x, y, z, val, 3, z, 'noshare');
 %!
 %! p = patch ('Faces', fv.faces, 'Vertices', fv.vertices, 'FaceVertexCData', ...
 %!            fv.facevertexcdata, 'FaceColor', 'interp', 'EdgeColor', 'black');
--- a/scripts/plot/draw/trisurf.m	Sun Jun 26 13:32:03 2016 +0200
+++ b/scripts/plot/draw/trisurf.m	Wed Jul 20 20:44:21 2016 +0200
@@ -68,17 +68,9 @@
   else
     c = z(:);
   endif
-  ## FIXME: Is all this extra input parsing necessary?
-  ##        Is it for Matlab compatibility?
+  ## For Matlab compatibility:
   if (! any (strcmpi (varargin, "FaceColor")))
-    nfc = numel (varargin) + 1;
-    varargin(nfc+(0:1)) = {"FaceColor", "flat"};
-  else
-    nfc = find (any (strcmpi (varargin, "FaceColor")), 1);
-  endif
-  if (! any (strcmpi (varargin, "EdgeColor"))
-      && strcmpi (varargin{nfc+1}, "interp"))
-    varargin(end+(1:2)) = {"EdgeColor", "none"};
+    varargin(end+(1:2)) = {"FaceColor", "flat"};
   endif
 
   hax = newplot ();