annotate scripts/plot/trisurf.m @ 14138:72c96de7a403 stable

maint: update copyright notices for 2012
author John W. Eaton <jwe@octave.org>
date Mon, 02 Jan 2012 14:25:41 -0500
parents 5be545210fe3
children 11949c9795a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14138
72c96de7a403 maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents: 14108
diff changeset
1 ## Copyright (C) 2007-2012 David Bateman
9110
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
2 ##
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
3 ## This file is part of Octave.
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
4 ##
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
6 ## under the terms of the GNU General Public License as published by
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
8 ## your option) any later version.
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
9 ##
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
13 ## General Public License for more details.
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
14 ##
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
15 ## You should have received a copy of the GNU General Public License
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
17 ## <http://www.gnu.org/licenses/>.
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
18
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
19 ## -*- texinfo -*-
10793
be55736a0783 Grammarcheck the documentation from m-files.
Rik <octave@nomad.inbox5.com>
parents: 10549
diff changeset
20 ## @deftypefn {Function File} {} trisurf (@var{tri}, @var{x}, @var{y}, @var{z})
9110
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
21 ## @deftypefnx {Function File} {@var{h} =} trisurf (@dots{})
10793
be55736a0783 Grammarcheck the documentation from m-files.
Rik <octave@nomad.inbox5.com>
parents: 10549
diff changeset
22 ## Plot a triangular surface in 3D@. The variable @var{tri} is the triangular
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
23 ## meshing of the points @code{(@var{x}, @var{y})} which is returned
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
24 ## from @code{delaunay}. The variable @var{z} is value at the point
14001
5f0bb45e615c doc: Update documentation for functions returning a graphics handle h (Bug #34761)
Rik <octave@nomad.inbox5.com>
parents: 13747
diff changeset
25 ## @code{(@var{x}, @var{y})}.
5f0bb45e615c doc: Update documentation for functions returning a graphics handle h (Bug #34761)
Rik <octave@nomad.inbox5.com>
parents: 13747
diff changeset
26 ##
5f0bb45e615c doc: Update documentation for functions returning a graphics handle h (Bug #34761)
Rik <octave@nomad.inbox5.com>
parents: 13747
diff changeset
27 ## The optional return value @var{h} is a graphics handle to the created plot.
12187
87926ee23581 Add undocumented function trisurf to manual.
Rik <octave@nomad.inbox5.com>
parents: 11587
diff changeset
28 ## @seealso{triplot, trimesh, delaunay3}
9110
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
29 ## @end deftypefn
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
30
13747
e8564e8b0043 Restore random number state after %!demos or %!tests
Rik <octave@nomad.inbox5.com>
parents: 13141
diff changeset
31 function h = trisurf (tri, x, y, z, varargin)
9110
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
32
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
33 if (nargin < 3)
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
34 print_usage ();
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
35 endif
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
36
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
37 if (nargin == 3)
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
38 triplot (tri, x, y);
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
39 elseif (ischar (z))
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
40 triplot (tri, x, y, z, varargin{:});
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
41 else
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
42 if (nargin > 4 && isnumeric (varargin{1}))
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
43 c = varargin{1};
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
44 varargin(1) = [];
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
45 else
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
46 c = z;
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
47 endif
12524
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
48 if (! any (strcmpi (varargin, "FaceColor")))
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
49 nfc = numel (varargin) + 1;
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
50 varargin(nfc+(0:1)) = {"FaceColor", "flat"};
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
51 else
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
52 nfc = find (any (strcmpi (varargin, "FaceColor")), 1);
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
53 endif
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
54 if (! any (strcmpi (varargin, "EdgeColor"))
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
55 && strcmpi (varargin{nfc+1}, "interp"))
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
56 varargin(end+(1:2)) = {"EdgeColor", "none"};
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
57 endif
9110
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
58 newplot ();
13747
e8564e8b0043 Restore random number state after %!demos or %!tests
Rik <octave@nomad.inbox5.com>
parents: 13141
diff changeset
59 handle = patch ("Faces", tri, "Vertices", [x(:), y(:), z(:)],
e8564e8b0043 Restore random number state after %!demos or %!tests
Rik <octave@nomad.inbox5.com>
parents: 13141
diff changeset
60 "FaceVertexCData", reshape (c, numel (c), 1),
e8564e8b0043 Restore random number state after %!demos or %!tests
Rik <octave@nomad.inbox5.com>
parents: 13141
diff changeset
61 varargin{:});
9110
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
62 if (nargout > 0)
13747
e8564e8b0043 Restore random number state after %!demos or %!tests
Rik <octave@nomad.inbox5.com>
parents: 13141
diff changeset
63 h = handle;
9110
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
64 endif
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
65
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
66 if (! ishold ())
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
67 set (gca(), "view", [-37.5, 30],
10549
95c3e38098bf Untabify .m scripts
Rik <code@nomad.inbox5.com>
parents: 9245
diff changeset
68 "xgrid", "on", "ygrid", "on", "zgrid", "on");
9110
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
69 endif
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
70 endif
13747
e8564e8b0043 Restore random number state after %!demos or %!tests
Rik <octave@nomad.inbox5.com>
parents: 13141
diff changeset
71
9110
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
72 endfunction
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
73
14108
5be545210fe3 Trisurf() improvements.
Ben Abbott <bpabbott@mac.com>
parents: 14092
diff changeset
74 %!demo
5be545210fe3 Trisurf() improvements.
Ben Abbott <bpabbott@mac.com>
parents: 14092
diff changeset
75 %! clf
5be545210fe3 Trisurf() improvements.
Ben Abbott <bpabbott@mac.com>
parents: 14092
diff changeset
76 %! N = 31;
5be545210fe3 Trisurf() improvements.
Ben Abbott <bpabbott@mac.com>
parents: 14092
diff changeset
77 %! [x, y] = meshgrid (1:N);
5be545210fe3 Trisurf() improvements.
Ben Abbott <bpabbott@mac.com>
parents: 14092
diff changeset
78 %! tri = delaunay (x, y);
5be545210fe3 Trisurf() improvements.
Ben Abbott <bpabbott@mac.com>
parents: 14092
diff changeset
79 %! z = peaks (N);
5be545210fe3 Trisurf() improvements.
Ben Abbott <bpabbott@mac.com>
parents: 14092
diff changeset
80 %! h = trisurf (tri, x, y, z, "facecolor", "interp");
5be545210fe3 Trisurf() improvements.
Ben Abbott <bpabbott@mac.com>
parents: 14092
diff changeset
81 %! axis tight
5be545210fe3 Trisurf() improvements.
Ben Abbott <bpabbott@mac.com>
parents: 14092
diff changeset
82 %! zlim auto
5be545210fe3 Trisurf() improvements.
Ben Abbott <bpabbott@mac.com>
parents: 14092
diff changeset
83 %! title (sprintf ("facecolor = %s", get (h, "facecolor")))
5be545210fe3 Trisurf() improvements.
Ben Abbott <bpabbott@mac.com>
parents: 14092
diff changeset
84
5be545210fe3 Trisurf() improvements.
Ben Abbott <bpabbott@mac.com>
parents: 14092
diff changeset
85 %!demo
5be545210fe3 Trisurf() improvements.
Ben Abbott <bpabbott@mac.com>
parents: 14092
diff changeset
86 %! clf
5be545210fe3 Trisurf() improvements.
Ben Abbott <bpabbott@mac.com>
parents: 14092
diff changeset
87 %! N = 31;
5be545210fe3 Trisurf() improvements.
Ben Abbott <bpabbott@mac.com>
parents: 14092
diff changeset
88 %! [x, y] = meshgrid (1:N);
5be545210fe3 Trisurf() improvements.
Ben Abbott <bpabbott@mac.com>
parents: 14092
diff changeset
89 %! tri = delaunay (x, y);
5be545210fe3 Trisurf() improvements.
Ben Abbott <bpabbott@mac.com>
parents: 14092
diff changeset
90 %! z = peaks (N);
5be545210fe3 Trisurf() improvements.
Ben Abbott <bpabbott@mac.com>
parents: 14092
diff changeset
91 %! h = trisurf (tri, x, y, z, "facecolor", "flat");
5be545210fe3 Trisurf() improvements.
Ben Abbott <bpabbott@mac.com>
parents: 14092
diff changeset
92 %! axis tight
5be545210fe3 Trisurf() improvements.
Ben Abbott <bpabbott@mac.com>
parents: 14092
diff changeset
93 %! zlim auto
5be545210fe3 Trisurf() improvements.
Ben Abbott <bpabbott@mac.com>
parents: 14092
diff changeset
94 %! title (sprintf ("facecolor = %s", get (h, "facecolor")))
13747
e8564e8b0043 Restore random number state after %!demos or %!tests
Rik <octave@nomad.inbox5.com>
parents: 13141
diff changeset
95
9110
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
96 %!demo
14092
22c50cbad2ce Add clf() to all plot demos.
Ben Abbott <bpabbott@mac.com>
parents: 14001
diff changeset
97 %! clf
13747
e8564e8b0043 Restore random number state after %!demos or %!tests
Rik <octave@nomad.inbox5.com>
parents: 13141
diff changeset
98 %! old_state = rand ("state");
e8564e8b0043 Restore random number state after %!demos or %!tests
Rik <octave@nomad.inbox5.com>
parents: 13141
diff changeset
99 %! restore_state = onCleanup (@() rand ("state", old_state));
e8564e8b0043 Restore random number state after %!demos or %!tests
Rik <octave@nomad.inbox5.com>
parents: 13141
diff changeset
100 %! rand ("state", 10);
9110
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
101 %! N = 10;
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
102 %! x = 3 - 6 * rand (N, N);
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
103 %! y = 3 - 6 * rand (N, N);
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
104 %! z = peaks (x, y);
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
105 %! tri = delaunay (x(:), y(:));
22ae6b3411a7 Add isocolor, isonormals and isosurface functions (For Martin Helm). Add 3D filled triangular patches and the trisurf function
David Bateman <dbateman@free.fr>
parents:
diff changeset
106 %! trisurf (tri, x(:), y(:), z(:));
12524
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
107
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
108 %!demo
14092
22c50cbad2ce Add clf() to all plot demos.
Ben Abbott <bpabbott@mac.com>
parents: 14001
diff changeset
109 %! clf
12524
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
110 %! x = rand (100, 1);
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
111 %! y = rand (100, 1);
13141
e81ddf9cacd5 maint: untabify and remove trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 12792
diff changeset
112 %! z = x.^2 + y.^2;
e81ddf9cacd5 maint: untabify and remove trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 12792
diff changeset
113 %! tri = delaunay (x, y);
14001
5f0bb45e615c doc: Update documentation for functions returning a graphics handle h (Bug #34761)
Rik <octave@nomad.inbox5.com>
parents: 13747
diff changeset
114 %! trisurf (tri, x, y, z);
12524
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
115
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
116 %!demo
14092
22c50cbad2ce Add clf() to all plot demos.
Ben Abbott <bpabbott@mac.com>
parents: 14001
diff changeset
117 %! clf
12524
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
118 %! x = rand (100, 1);
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
119 %! y = rand (100, 1);
13141
e81ddf9cacd5 maint: untabify and remove trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 12792
diff changeset
120 %! z = x.^2 + y.^2;
e81ddf9cacd5 maint: untabify and remove trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 12792
diff changeset
121 %! tri = delaunay (x, y);
14001
5f0bb45e615c doc: Update documentation for functions returning a graphics handle h (Bug #34761)
Rik <octave@nomad.inbox5.com>
parents: 13747
diff changeset
122 %! trisurf (tri, x, y, z, "facecolor", "interp");
12524
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
123
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
124 %!demo
14092
22c50cbad2ce Add clf() to all plot demos.
Ben Abbott <bpabbott@mac.com>
parents: 14001
diff changeset
125 %! clf
12524
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
126 %! x = rand (100, 1);
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
127 %! y = rand (100, 1);
13141
e81ddf9cacd5 maint: untabify and remove trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 12792
diff changeset
128 %! z = x.^2 + y.^2;
e81ddf9cacd5 maint: untabify and remove trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 12792
diff changeset
129 %! tri = delaunay (x, y);
14001
5f0bb45e615c doc: Update documentation for functions returning a graphics handle h (Bug #34761)
Rik <octave@nomad.inbox5.com>
parents: 13747
diff changeset
130 %! trisurf (tri, x, y, z, "facecolor", "interp", "edgecolor", "k");
12524
482cf3aad915 trisurf.m: Set default edgecolor as Matlab does. Add demos.
Ben Abbott <bpabbott@mac.com>
parents: 12187
diff changeset
131