Mercurial > octave
annotate scripts/image/image.m @ 27923:bd51beb6205e
update formatting of copyright notices
* Use <https://octave.org/copyright/> instead of
<https://octave.org/COPYRIGHT.html/>.
* For consistency with other comments in the Octave sources, use
C++-style comments for copyright blocks in C and C++ files.
* Use delimiters above and below copyright blocks that are appropriate
for the language used in the file.
* Eliminate extra spacing inside copyright blocks.
* lex.ll (looks_like_copyright): Also allow newlines and carriage
returns before the word "Copyright".
* scripts/mk-doc.pl (gethelp): Also skip empty comment lines.
* bp-table.cc, type.m: Adjust tests.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 08 Jan 2020 11:59:41 -0500 |
parents | 1891570abac8 |
children | bdad8ca48700 |
rev | line source |
---|---|
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
1 ######################################################################## |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
2 ## |
27919
1891570abac8
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
27918
diff
changeset
|
3 ## Copyright (C) 1994-2020 The Octave Project Developers |
27918
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
4 ## |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
5 ## See the file COPYRIGHT.md in the top-level directory of this |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
6 ## distribution or <https://octave.org/copyright/>. |
2313 | 7 ## |
8 ## This file is part of Octave. | |
9 ## | |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23573
diff
changeset
|
10 ## Octave is free software: you can redistribute it and/or modify it |
2313 | 11 ## under the terms of the GNU General Public License as published by |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23573
diff
changeset
|
12 ## the Free Software Foundation, either version 3 of the License, or |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22489
diff
changeset
|
13 ## (at your option) any later version. |
2313 | 14 ## |
15 ## Octave is distributed in the hope that it will be useful, but | |
16 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22489
diff
changeset
|
17 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22489
diff
changeset
|
18 ## GNU General Public License for more details. |
2313 | 19 ## |
20 ## You should have received a copy of the GNU General Public License | |
7016 | 21 ## along with Octave; see the file COPYING. If not, see |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23573
diff
changeset
|
22 ## <https://www.gnu.org/licenses/>. |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
23 ## |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
24 ######################################################################## |
1024 | 25 |
3381 | 26 ## -*- texinfo -*- |
20852
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20158
diff
changeset
|
27 ## @deftypefn {} {} image (@var{img}) |
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20158
diff
changeset
|
28 ## @deftypefnx {} {} image (@var{x}, @var{y}, @var{img}) |
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20158
diff
changeset
|
29 ## @deftypefnx {} {} image (@dots{}, "@var{prop}", @var{val}, @dots{}) |
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20158
diff
changeset
|
30 ## @deftypefnx {} {} image ("@var{prop1}", @var{val1}, @dots{}) |
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20158
diff
changeset
|
31 ## @deftypefnx {} {@var{h} =} image (@dots{}) |
15683
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
32 ## Display a matrix as an indexed color image. |
3651 | 33 ## |
14260
1f911333ed3d
doc: Update docstrings for functions in image/ directory
Rik <octave@nomad.inbox5.com>
parents:
14247
diff
changeset
|
34 ## The elements of @var{img} are indices into the current colormap. |
20158
7503499a252b
doc: Update docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19962
diff
changeset
|
35 ## |
15683
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
36 ## @var{x} and @var{y} are optional 2-element vectors, @w{@code{[min, max]}}, |
25856
9578af67a0d4
Document that image x/ydata indicate the centers of corner pixels (bug #54610).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
37 ## which specify the coordinates of the centers of the corner pixels. |
9578af67a0d4
Document that image x/ydata indicate the centers of corner pixels (bug #54610).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
38 ## If a range is specified as @w{@code{[max, min]}} then the image will be |
9578af67a0d4
Document that image x/ydata indicate the centers of corner pixels (bug #54610).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
39 ## reversed along that axis. For convenience, @var{x} and @var{y} may be |
9578af67a0d4
Document that image x/ydata indicate the centers of corner pixels (bug #54610).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
40 ## specified as N-element vectors matching the length of the data in @var{img}. |
9578af67a0d4
Document that image x/ydata indicate the centers of corner pixels (bug #54610).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
41 ## However, only the first and last elements will be used to determine the axis |
9578af67a0d4
Document that image x/ydata indicate the centers of corner pixels (bug #54610).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
42 ## limits. |
10817
d9147775da54
image.m: Always reverse 'ydir' property when displaying images.
Rik <octave@nomad.inbox5.com>
parents:
10793
diff
changeset
|
43 ## |
17689
dd8db3f1c1da
doc: Add information about High-Level/Low-Level calling forms for image, imagesc.
Rik <rik@octave.org>
parents:
17648
diff
changeset
|
44 ## Multiple property/value pairs may be specified for the image object, but |
dd8db3f1c1da
doc: Add information about High-Level/Low-Level calling forms for image, imagesc.
Rik <rik@octave.org>
parents:
17648
diff
changeset
|
45 ## they must appear in pairs. |
dd8db3f1c1da
doc: Add information about High-Level/Low-Level calling forms for image, imagesc.
Rik <rik@octave.org>
parents:
17648
diff
changeset
|
46 ## |
14260
1f911333ed3d
doc: Update docstrings for functions in image/ directory
Rik <octave@nomad.inbox5.com>
parents:
14247
diff
changeset
|
47 ## The optional return value @var{h} is a graphics handle to the image. |
1f911333ed3d
doc: Update docstrings for functions in image/ directory
Rik <octave@nomad.inbox5.com>
parents:
14247
diff
changeset
|
48 ## |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
49 ## Implementation Note: The origin (0, 0) for images is located in the |
10817
d9147775da54
image.m: Always reverse 'ydir' property when displaying images.
Rik <octave@nomad.inbox5.com>
parents:
10793
diff
changeset
|
50 ## upper left. For ordinary plots, the origin is located in the lower |
d9147775da54
image.m: Always reverse 'ydir' property when displaying images.
Rik <octave@nomad.inbox5.com>
parents:
10793
diff
changeset
|
51 ## left. Octave handles this inversion by plotting the data normally, |
d9147775da54
image.m: Always reverse 'ydir' property when displaying images.
Rik <octave@nomad.inbox5.com>
parents:
10793
diff
changeset
|
52 ## and then reversing the direction of the y-axis by setting the |
17281
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
17038
diff
changeset
|
53 ## @code{ydir} property to @qcode{"reverse"}. This has implications whenever |
10817
d9147775da54
image.m: Always reverse 'ydir' property when displaying images.
Rik <octave@nomad.inbox5.com>
parents:
10793
diff
changeset
|
54 ## an image and an ordinary plot need to be overlaid. The recommended |
d9147775da54
image.m: Always reverse 'ydir' property when displaying images.
Rik <octave@nomad.inbox5.com>
parents:
10793
diff
changeset
|
55 ## solution is to display the image and then plot the reversed ydata |
15683
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
56 ## using, for example, @code{flipud (ydata)}. |
14001
5f0bb45e615c
doc: Update documentation for functions returning a graphics handle h (Bug #34761)
Rik <octave@nomad.inbox5.com>
parents:
13993
diff
changeset
|
57 ## |
17689
dd8db3f1c1da
doc: Add information about High-Level/Low-Level calling forms for image, imagesc.
Rik <rik@octave.org>
parents:
17648
diff
changeset
|
58 ## Calling Forms: The @code{image} function can be called in two forms: |
dd8db3f1c1da
doc: Add information about High-Level/Low-Level calling forms for image, imagesc.
Rik <rik@octave.org>
parents:
17648
diff
changeset
|
59 ## High-Level and Low-Level. When invoked with normal options, the High-Level |
dd8db3f1c1da
doc: Add information about High-Level/Low-Level calling forms for image, imagesc.
Rik <rik@octave.org>
parents:
17648
diff
changeset
|
60 ## form is used which first calls @code{newplot} to prepare the graphic figure |
dd8db3f1c1da
doc: Add information about High-Level/Low-Level calling forms for image, imagesc.
Rik <rik@octave.org>
parents:
17648
diff
changeset
|
61 ## and axes. When the only inputs to @code{image} are property/value pairs |
dd8db3f1c1da
doc: Add information about High-Level/Low-Level calling forms for image, imagesc.
Rik <rik@octave.org>
parents:
17648
diff
changeset
|
62 ## the Low-Level form is used which creates a new instance of an image object |
dd8db3f1c1da
doc: Add information about High-Level/Low-Level calling forms for image, imagesc.
Rik <rik@octave.org>
parents:
17648
diff
changeset
|
63 ## and inserts it in the current axes. |
24551
a7b6502b5cb5
doc: Add @ref from graphic object creation functions to list of graphic properties (bug #52816).
Rik <rik@octave.org>
parents:
24534
diff
changeset
|
64 ## |
a7b6502b5cb5
doc: Add @ref from graphic object creation functions to list of graphic properties (bug #52816).
Rik <rik@octave.org>
parents:
24534
diff
changeset
|
65 ## Graphic Properties: The full list of properties is documented at |
a7b6502b5cb5
doc: Add @ref from graphic object creation functions to list of graphic properties (bug #52816).
Rik <rik@octave.org>
parents:
24534
diff
changeset
|
66 ## @ref{Image Properties,,Image Properties}. |
11109
41d18f6342f9
remove image_viewer function
John W. Eaton <jwe@octave.org>
parents:
11090
diff
changeset
|
67 ## @seealso{imshow, imagesc, colormap} |
3373 | 68 ## @end deftypefn |
559 | 69 |
3202 | 70 ## Author: Tony Richardson <arichard@stark.cc.oh.us> |
2312 | 71 ## Created: July 1994 |
72 ## Adapted-By: jwe | |
904 | 73 |
15683
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
74 function h = image (varargin) |
7189 | 75 |
17038
db90efd8f32b
image.m: Update to use new __plt_get_axis_arg__ without using "axes" and "newplot" function.
Rik <rik@octave.org>
parents:
15764
diff
changeset
|
76 [hax, varargin, nargin] = __plt_get_axis_arg__ ("image", varargin{:}); |
19593
446c46af4b42
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
18622
diff
changeset
|
77 |
15683
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
78 chararg = find (cellfun ("isclass", varargin, "char"), 1, "first"); |
19593
446c46af4b42
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
18622
diff
changeset
|
79 |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
80 do_new = true; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
81 if (nargin == 0) |
19324
68db8396c378
Make "image ()" use the default image cdata
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
18899
diff
changeset
|
82 img = get (0, "defaultimagecdata"); |
7276 | 83 x = y = []; |
19593
446c46af4b42
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
18622
diff
changeset
|
84 elseif (chararg == 1) |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
85 ## Low-Level syntax |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
86 do_new = false; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
87 x = y = img = []; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
88 idx = find (strcmpi (varargin, "cdata"), 1); |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
89 if (idx) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
90 img = varargin{idx+1}; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
91 varargin(idx:idx+1) = []; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
92 endif |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
93 idx = find (strcmpi (varargin, "xdata"), 1); |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
94 if (idx) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
95 x = varargin{idx+1}; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
96 varargin(idx:idx+1) = []; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
97 endif |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
98 idx = find (strcmpi (varargin, "ydata"), 1); |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
99 if (idx) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
100 y = varargin{idx+1}; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
101 varargin(idx:idx+1) = []; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
102 endif |
15683
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
103 elseif (nargin == 1 || chararg == 2) |
7276 | 104 img = varargin{1}; |
105 x = y = []; | |
15683
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
106 elseif (nargin == 2 || chararg == 3) |
7276 | 107 print_usage (); |
7189 | 108 else |
7276 | 109 x = varargin{1}; |
110 y = varargin{2}; | |
111 img = varargin{3}; | |
15683
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
112 chararg = 4; |
15064
489736962e80
image.m: Don't accept complex image data (bug #36866)
Rik <rik@octave.org>
parents:
14872
diff
changeset
|
113 endif |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
114 |
26184
572329faeb3b
image.m: Validate image data is not complex (bug #55170).
Rik <rik@octave.org>
parents:
26056
diff
changeset
|
115 if (iscomplex (img)) |
572329faeb3b
image.m: Validate image data is not complex (bug #55170).
Rik <rik@octave.org>
parents:
26056
diff
changeset
|
116 error ("image: IMG data can not be complex"); |
572329faeb3b
image.m: Validate image data is not complex (bug #55170).
Rik <rik@octave.org>
parents:
26056
diff
changeset
|
117 endif |
572329faeb3b
image.m: Validate image data is not complex (bug #55170).
Rik <rik@octave.org>
parents:
26056
diff
changeset
|
118 |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
119 oldfig = []; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
120 if (! isempty (hax)) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
121 oldfig = get (0, "currentfigure"); |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
122 endif |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
123 unwind_protect |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
124 if (do_new) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
125 hax = newplot (hax); |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
126 elseif (isempty (hax)) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
127 hax = gca (); |
18821
87c3848cf3c0
Fix bug when hggroup used with primitive graphic object (bug #42532).
Rik <rik@octave.org>
parents:
18683
diff
changeset
|
128 else |
87c3848cf3c0
Fix bug when hggroup used with primitive graphic object (bug #42532).
Rik <rik@octave.org>
parents:
18683
diff
changeset
|
129 hax = hax(1); |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
130 endif |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
131 |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
132 htmp = __img__ (hax, do_new, x, y, img, varargin{chararg:end}); |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
133 |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
134 unwind_protect_cleanup |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
135 if (! isempty (oldfig)) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
136 set (0, "currentfigure", oldfig); |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
137 endif |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
138 end_unwind_protect |
7276 | 139 |
7189 | 140 if (nargout > 0) |
15683
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
141 h = htmp; |
7189 | 142 endif |
143 | |
144 endfunction | |
9899
9f25290a35e8
more private function and subfunction changes
John W. Eaton <jwe@octave.org>
parents:
9245
diff
changeset
|
145 |
9f25290a35e8
more private function and subfunction changes
John W. Eaton <jwe@octave.org>
parents:
9245
diff
changeset
|
146 ## Generic image creation. |
9f25290a35e8
more private function and subfunction changes
John W. Eaton <jwe@octave.org>
parents:
9245
diff
changeset
|
147 ## |
9f25290a35e8
more private function and subfunction changes
John W. Eaton <jwe@octave.org>
parents:
9245
diff
changeset
|
148 ## The axis values corresponding to the matrix elements are specified in |
22488
a666e3ee6af8
Require gnuplot 4.4 as mininimum supported version.
Rik <rik@octave.org>
parents:
22366
diff
changeset
|
149 ## @var{x} and @var{y}. |
9899
9f25290a35e8
more private function and subfunction changes
John W. Eaton <jwe@octave.org>
parents:
9245
diff
changeset
|
150 |
9f25290a35e8
more private function and subfunction changes
John W. Eaton <jwe@octave.org>
parents:
9245
diff
changeset
|
151 ## Author: Tony Richardson <arichard@stark.cc.oh.us> |
9f25290a35e8
more private function and subfunction changes
John W. Eaton <jwe@octave.org>
parents:
9245
diff
changeset
|
152 ## Created: July 1994 |
9f25290a35e8
more private function and subfunction changes
John W. Eaton <jwe@octave.org>
parents:
9245
diff
changeset
|
153 ## Adapted-By: jwe |
9f25290a35e8
more private function and subfunction changes
John W. Eaton <jwe@octave.org>
parents:
9245
diff
changeset
|
154 |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
155 function h = __img__ (hax, do_new, x, y, img, varargin) |
9899
9f25290a35e8
more private function and subfunction changes
John W. Eaton <jwe@octave.org>
parents:
9245
diff
changeset
|
156 |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
157 if (! isempty (img)) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
158 |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
159 if (isempty (x)) |
18899
3d9e503aea2c
Update image "x/ydata" when "cdata" is changed (bug #42121)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
18821
diff
changeset
|
160 xdata = []; |
3d9e503aea2c
Update image "x/ydata" when "cdata" is changed (bug #42121)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
18821
diff
changeset
|
161 else |
3d9e503aea2c
Update image "x/ydata" when "cdata" is changed (bug #42121)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
18821
diff
changeset
|
162 xdata = x([1, end])(:).'; # (:).' is a hack to guarantee row vector |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
163 endif |
9899
9f25290a35e8
more private function and subfunction changes
John W. Eaton <jwe@octave.org>
parents:
9245
diff
changeset
|
164 |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
165 if (isempty (y)) |
18899
3d9e503aea2c
Update image "x/ydata" when "cdata" is changed (bug #42121)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
18821
diff
changeset
|
166 ydata = []; |
3d9e503aea2c
Update image "x/ydata" when "cdata" is changed (bug #42121)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
18821
diff
changeset
|
167 else |
3d9e503aea2c
Update image "x/ydata" when "cdata" is changed (bug #42121)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
18821
diff
changeset
|
168 ydata = y([1, end])(:).'; |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
169 endif |
9899
9f25290a35e8
more private function and subfunction changes
John W. Eaton <jwe@octave.org>
parents:
9245
diff
changeset
|
170 |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
171 if (numel (x) > 2 && numel (y) > 2) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
172 ## Test data for non-linear spacing which is unsupported |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
173 tol = .01; # 1% tolerance. FIXME: this value was chosen without thought. |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
174 dx = diff (x); |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
175 dxmean = (max (x) - min (x)) / (numel (x) - 1); |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
176 dx = abs ((abs (dx) - dxmean) / dxmean); |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
177 dy = diff (y); |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
178 dymean = (max (y) - min (y)) / (numel (y) - 1); |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
179 dy = abs ((abs (dy) - dymean) / dymean); |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
180 if (any (dx > tol) || any (dy > tol)) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
181 warning (["image: non-linear X, Y data is ignored. " ... |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
182 "IMG will be shown with linear mapping"]); |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
183 endif |
15683
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
184 endif |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
185 |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
186 endif # ! isempty (img) |
13980
bd2be36fd949
image.m: Warn if input coordinates are not linearly spaced.
Ben Abbott <bpabbott@mac.com>
parents:
13173
diff
changeset
|
187 |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
188 if (do_new && ! ishold (hax)) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
189 ## Set axis properties for new images |
19962
2e7497ff2535
image.m: Don't draw new image object twice for performance (bug #44567).
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
190 ## NOTE: Do this before calling __go_image__ so that image is not drawn |
2e7497ff2535
image.m: Don't draw new image object twice for performance (bug #44567).
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
191 ## once with default auto-scale axis limits and then a second time |
2e7497ff2535
image.m: Don't draw new image object twice for performance (bug #44567).
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
192 ## with tight axis limits. |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
193 if (! isempty (img)) |
19962
2e7497ff2535
image.m: Don't draw new image object twice for performance (bug #44567).
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
194 if (isempty (get (hax, "children"))) |
18622
3283ce934648
Set only 'axis tight' for image functions and Matlab compatibility (bug #42043, bug #41886)
Rik <rik@octave.org>
parents:
18524
diff
changeset
|
195 axis (hax, "tight"); |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
196 endif |
9899
9f25290a35e8
more private function and subfunction changes
John W. Eaton <jwe@octave.org>
parents:
9245
diff
changeset
|
197 |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
198 if (ndims (img) == 3) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
199 if (isinteger (img)) |
26056
df3f2e119944
Expand intmax/intmin to accept an integer variable as input.
Rik <rik@octave.org>
parents:
25856
diff
changeset
|
200 mn = intmin (img); |
df3f2e119944
Expand intmax/intmin to accept an integer variable as input.
Rik <rik@octave.org>
parents:
25856
diff
changeset
|
201 mx = intmax (img); |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
202 set (hax, "clim", double ([mn, mx])); |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
203 endif |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
204 endif |
9899
9f25290a35e8
more private function and subfunction changes
John W. Eaton <jwe@octave.org>
parents:
9245
diff
changeset
|
205 |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
206 endif # ! isempty (img) |
9899
9f25290a35e8
more private function and subfunction changes
John W. Eaton <jwe@octave.org>
parents:
9245
diff
changeset
|
207 |
22366
837df5db5710
Make graphic functions visually compatible w/Matlab.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
208 set (hax, "view", [0, 90], "ydir", "reverse", "layer", "top", "box", "on"); |
10817
d9147775da54
image.m: Always reverse 'ydir' property when displaying images.
Rik <octave@nomad.inbox5.com>
parents:
10793
diff
changeset
|
209 |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
210 endif # do_new |
9899
9f25290a35e8
more private function and subfunction changes
John W. Eaton <jwe@octave.org>
parents:
9245
diff
changeset
|
211 |
19962
2e7497ff2535
image.m: Don't draw new image object twice for performance (bug #44567).
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
212 h = __go_image__ (hax, "cdata", img, "xdata", xdata, "ydata", ydata, |
2e7497ff2535
image.m: Don't draw new image object twice for performance (bug #44567).
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
213 "cdatamapping", "direct", varargin{:}); |
2e7497ff2535
image.m: Don't draw new image object twice for performance (bug #44567).
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
214 |
2e7497ff2535
image.m: Don't draw new image object twice for performance (bug #44567).
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
215 if (do_new && ! ishold (hax) && ! isempty (img) |
2e7497ff2535
image.m: Don't draw new image object twice for performance (bug #44567).
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
216 && isscalar (get (hax, "children"))) |
2e7497ff2535
image.m: Don't draw new image object twice for performance (bug #44567).
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
217 ## Re-scale axis limits for an image in a new figure or axis. |
2e7497ff2535
image.m: Don't draw new image object twice for performance (bug #44567).
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
218 axis (hax, "tight"); |
2e7497ff2535
image.m: Don't draw new image object twice for performance (bug #44567).
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
219 endif |
2e7497ff2535
image.m: Don't draw new image object twice for performance (bug #44567).
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
220 |
9899
9f25290a35e8
more private function and subfunction changes
John W. Eaton <jwe@octave.org>
parents:
9245
diff
changeset
|
221 endfunction |
10942
48a1812fcc3a
image.m: Matlab compatible axis limits, add demo.
Ben Abbott <bpabbott@mac.com>
parents:
10818
diff
changeset
|
222 |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
223 |
10942
48a1812fcc3a
image.m: Matlab compatible axis limits, add demo.
Ben Abbott <bpabbott@mac.com>
parents:
10818
diff
changeset
|
224 %!demo |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
225 %! clf; |
15683
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
226 %! colormap (jet (21)); |
11080
36ceff79607b
image.m: Allow x/ydata to imply a flip of the image. Modify demos.
Ben Abbott <bpabbott@mac.com>
parents:
11076
diff
changeset
|
227 %! img = 1 ./ hilb (11); |
15683
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
228 %! x = y = -5:5; |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
229 %! subplot (2,2,1); |
15683
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
230 %! h = image (x, y, img); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
231 %! ylabel ("limits = [-5.5, 5.5]"); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
232 %! title ("image (x, y, img)"); |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
233 %! subplot (2,2,2); |
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
234 %! h = image (-x, y, img); |
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
235 %! title ("image (-x, y, img)"); |
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
236 %! subplot (2,2,3); |
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
237 %! h = image (x, -y, img); |
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
238 %! title ("image (x, -y, img)"); |
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
239 %! ylabel ("limits = [-5.5, 5.5]"); |
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
240 %! subplot (2,2,4); |
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
241 %! h = image (-x, -y, img); |
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
242 %! title ("image (-x, -y, img)"); |
10942
48a1812fcc3a
image.m: Matlab compatible axis limits, add demo.
Ben Abbott <bpabbott@mac.com>
parents:
10818
diff
changeset
|
243 |
22489
93ea313301f9
test: Add bug ids (<#####>) to BIST tests.
Rik <rik@octave.org>
parents:
22488
diff
changeset
|
244 ## test hidden properties x/ydatamode |
23573
1b4f4ec53b4a
use new script to tag fixed bugs in tests
John W. Eaton <jwe@octave.org>
parents:
23572
diff
changeset
|
245 %!test <*42121> |
18899
3d9e503aea2c
Update image "x/ydata" when "cdata" is changed (bug #42121)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
18821
diff
changeset
|
246 %! hf = figure ("visible", "off"); |
3d9e503aea2c
Update image "x/ydata" when "cdata" is changed (bug #42121)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
18821
diff
changeset
|
247 %! unwind_protect |
3d9e503aea2c
Update image "x/ydata" when "cdata" is changed (bug #42121)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
18821
diff
changeset
|
248 %! nx = 64; ny = 64; |
3d9e503aea2c
Update image "x/ydata" when "cdata" is changed (bug #42121)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
18821
diff
changeset
|
249 %! cdata = rand (ny, nx)*127; |
3d9e503aea2c
Update image "x/ydata" when "cdata" is changed (bug #42121)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
18821
diff
changeset
|
250 %! hi = image (cdata); # x/ydatamode is auto |
21580
ecce63c99c3f
maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents:
20852
diff
changeset
|
251 %! assert (get (hi, "xdata"), [1 nx]); |
ecce63c99c3f
maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents:
20852
diff
changeset
|
252 %! assert (get (hi, "ydata"), [1 ny]); |
ecce63c99c3f
maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents:
20852
diff
changeset
|
253 %! set (hi, "cdata", cdata(1:2:end, 1:2:end)); |
ecce63c99c3f
maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents:
20852
diff
changeset
|
254 %! assert (get (hi, "xdata"), [1 nx/2]); |
ecce63c99c3f
maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents:
20852
diff
changeset
|
255 %! assert (get (hi, "ydata"), [1 ny/2]); |
19597
db92e7e28e1f
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
19596
diff
changeset
|
256 %! |
21580
ecce63c99c3f
maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents:
20852
diff
changeset
|
257 %! set (hi, "xdata", [10 100]); # xdatamode is now manual |
ecce63c99c3f
maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents:
20852
diff
changeset
|
258 %! set (hi, "ydata", [10 1000]); # ydatamode is now manual |
ecce63c99c3f
maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents:
20852
diff
changeset
|
259 %! set (hi, "cdata", cdata); |
ecce63c99c3f
maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents:
20852
diff
changeset
|
260 %! assert (get (hi, "xdata"), [10 100]); |
ecce63c99c3f
maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents:
20852
diff
changeset
|
261 %! assert (get (hi, "ydata"), [10 1000]); |
19597
db92e7e28e1f
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
19596
diff
changeset
|
262 %! |
21580
ecce63c99c3f
maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents:
20852
diff
changeset
|
263 %! set (hi, "ydata", []); # ydatamode is now auto |
ecce63c99c3f
maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents:
20852
diff
changeset
|
264 %! set (hi, "cdata", cdata(1:2:end, 1:2:end)); |
ecce63c99c3f
maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents:
20852
diff
changeset
|
265 %! assert (get (hi, "xdata"), [10 100]); |
ecce63c99c3f
maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents:
20852
diff
changeset
|
266 %! assert (get (hi, "ydata"), [1 ny/2]); |
18899
3d9e503aea2c
Update image "x/ydata" when "cdata" is changed (bug #42121)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
18821
diff
changeset
|
267 %! unwind_protect_cleanup |
21580
ecce63c99c3f
maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents:
20852
diff
changeset
|
268 %! close (hf); |
18899
3d9e503aea2c
Update image "x/ydata" when "cdata" is changed (bug #42121)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
18821
diff
changeset
|
269 %! end_unwind_protect |
3d9e503aea2c
Update image "x/ydata" when "cdata" is changed (bug #42121)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
18821
diff
changeset
|
270 |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
271 ## FIXME: Need %!tests for linear |
26184
572329faeb3b
image.m: Validate image data is not complex (bug #55170).
Rik <rik@octave.org>
parents:
26056
diff
changeset
|
272 |
572329faeb3b
image.m: Validate image data is not complex (bug #55170).
Rik <rik@octave.org>
parents:
26056
diff
changeset
|
273 %!error <IMG data can not be complex> image ([1, i]) |