Mercurial > octave-nkf
annotate scripts/image/imagesc.m @ 20193:7503499a252b stable
doc: Update docstrings to have one sentence summary as first line.
Update scripts in audio, elfun, general, geometry, and image directories.
* scripts/audio/@audioplayer/__get_properties__.m,
scripts/audio/@audioplayer/audioplayer.m, scripts/audio/@audioplayer/get.m,
scripts/audio/@audioplayer/isplaying.m, scripts/audio/@audioplayer/play.m,
scripts/audio/@audioplayer/playblocking.m, scripts/audio/@audioplayer/set.m,
scripts/audio/@audioplayer/subsasgn.m, scripts/audio/@audioplayer/subsref.m,
scripts/audio/@audiorecorder/audiorecorder.m,
scripts/audio/@audiorecorder/get.m,
scripts/audio/@audiorecorder/getaudiodata.m,
scripts/audio/@audiorecorder/getplayer.m,
scripts/audio/@audiorecorder/isrecording.m,
scripts/audio/@audiorecorder/play.m, scripts/audio/@audiorecorder/record.m,
scripts/audio/@audiorecorder/recordblocking.m,
scripts/audio/@audiorecorder/set.m, scripts/audio/@audiorecorder/stop.m,
scripts/audio/@audiorecorder/subsasgn.m,
scripts/audio/@audiorecorder/subsref.m, scripts/audio/lin2mu.m,
scripts/audio/mu2lin.m, scripts/audio/record.m, scripts/audio/sound.m,
scripts/audio/soundsc.m, scripts/audio/wavread.m, scripts/audio/wavwrite.m,
scripts/elfun/cosd.m, scripts/elfun/sind.m, scripts/elfun/tand.m,
scripts/general/accumarray.m, scripts/general/accumdim.m,
scripts/general/bitcmp.m, scripts/general/bitget.m, scripts/general/bitset.m,
scripts/general/blkdiag.m, scripts/general/cart2pol.m,
scripts/general/cart2sph.m, scripts/general/cell2mat.m,
scripts/general/celldisp.m, scripts/general/chop.m,
scripts/general/circshift.m, scripts/general/common_size.m,
scripts/general/cplxpair.m, scripts/general/cumtrapz.m,
scripts/general/dblquad.m, scripts/general/deal.m, scripts/general/del2.m,
scripts/general/display.m, scripts/general/divergence.m,
scripts/general/fieldnames.m, scripts/general/flip.m,
scripts/general/flipdim.m, scripts/general/fliplr.m, scripts/general/flipud.m,
scripts/general/gradient.m, scripts/general/interp3.m,
scripts/general/interpft.m, scripts/general/interpn.m,
scripts/general/loadobj.m, scripts/general/logspace.m,
scripts/general/methods.m, scripts/general/nargchk.m,
scripts/general/narginchk.m, scripts/general/nargoutchk.m,
scripts/general/nextpow2.m, scripts/general/nthargout.m,
scripts/general/num2str.m, scripts/general/pol2cart.m,
scripts/general/polyarea.m, scripts/general/postpad.m,
scripts/general/prepad.m, scripts/general/profile.m, scripts/general/quadgk.m,
scripts/general/quadl.m, scripts/general/quadv.m, scripts/general/randi.m,
scripts/general/rat.m, scripts/general/repmat.m, scripts/general/rot90.m,
scripts/general/rotdim.m, scripts/general/saveobj.m, scripts/general/shift.m,
scripts/general/shiftdim.m, scripts/general/sortrows.m,
scripts/general/sph2cart.m, scripts/general/structfun.m,
scripts/general/subsindex.m, scripts/general/trapz.m,
scripts/general/triplequad.m, scripts/geometry/delaunayn.m,
scripts/geometry/dsearch.m, scripts/geometry/dsearchn.m,
scripts/geometry/griddata.m, scripts/geometry/griddata3.m,
scripts/geometry/griddatan.m, scripts/geometry/inpolygon.m,
scripts/geometry/rectint.m, scripts/geometry/tsearchn.m,
scripts/geometry/voronoi.m, scripts/geometry/voronoin.m,
scripts/help/__unimplemented__.m, scripts/help/doc.m,
scripts/help/doc_cache_create.m, scripts/help/get_first_help_sentence.m,
scripts/help/help.m, scripts/help/lookfor.m, scripts/help/print_usage.m,
scripts/help/type.m, scripts/help/which.m, scripts/image/autumn.m,
scripts/image/bone.m, scripts/image/brighten.m, scripts/image/cmpermute.m,
scripts/image/colorcube.m, scripts/image/contrast.m, scripts/image/cool.m,
scripts/image/copper.m, scripts/image/cubehelix.m, scripts/image/flag.m,
scripts/image/gmap40.m, scripts/image/gray.m, scripts/image/gray2ind.m,
scripts/image/hot.m, scripts/image/hsv.m, scripts/image/image.m,
scripts/image/imagesc.m, scripts/image/imfinfo.m, scripts/image/imformats.m,
scripts/image/imread.m, scripts/image/imshow.m, scripts/image/imwrite.m,
scripts/image/iscolormap.m, scripts/image/jet.m, scripts/image/lines.m,
scripts/image/ntsc2rgb.m, scripts/image/ocean.m, scripts/image/pink.m,
scripts/image/prism.m, scripts/image/rainbow.m, scripts/image/rgb2ntsc.m,
scripts/image/spinmap.m, scripts/image/spring.m, scripts/image/summer.m,
scripts/image/white.m, scripts/image/winter.m:
Update docstrings to have one sentence summary as first line.
Re-structure to have line lengths <= 80 chars.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 03 May 2015 09:36:20 -0700 |
parents | 4197fc428c7d |
children |
rev | line source |
---|---|
19731
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
18656
diff
changeset
|
1 ## Copyright (C) 1994-2015 John W. Eaton |
2313 | 2 ## |
3 ## This file is part of Octave. | |
4 ## | |
5 ## Octave is free software; you can redistribute it and/or modify it | |
6 ## under the terms of the GNU General Public License as published by | |
7016 | 7 ## the Free Software Foundation; either version 3 of the License, or (at |
8 ## your option) any later version. | |
2313 | 9 ## |
10 ## Octave is distributed in the hope that it will be useful, but | |
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 ## General Public License for more details. | |
14 ## | |
15 ## You should have received a copy of the GNU General Public License | |
7016 | 16 ## along with Octave; see the file COPYING. If not, see |
17 ## <http://www.gnu.org/licenses/>. | |
1024 | 18 |
3381 | 19 ## -*- texinfo -*- |
15683
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
20 ## @deftypefn {Function File} {} imagesc (@var{img}) |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
21 ## @deftypefnx {Function File} {} imagesc (@var{x}, @var{y}, @var{img}) |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
22 ## @deftypefnx {Function File} {} imagesc (@dots{}, @var{climits}) |
17689
dd8db3f1c1da
doc: Add information about High-Level/Low-Level calling forms for image, imagesc.
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
23 ## @deftypefnx {Function File} {} imagesc (@dots{}, "@var{prop}", @var{val}, @dots{}) |
dd8db3f1c1da
doc: Add information about High-Level/Low-Level calling forms for image, imagesc.
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
24 ## @deftypefnx {Function File} {} imagesc ("@var{prop1}", @var{val1}, @dots{}) |
17125
b5d6314314fc
Change various plot functions to take advantage of new isaxes() function.
Rik <rik@octave.org>
parents:
15683
diff
changeset
|
25 ## @deftypefnx {Function File} {} imagesc (@var{hax}, @dots{}) |
7650 | 26 ## @deftypefnx {Function File} {@var{h} =} imagesc (@dots{}) |
20193
7503499a252b
doc: Update docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19731
diff
changeset
|
27 ## Display a scaled version of the matrix @var{img} as a color image. |
7503499a252b
doc: Update docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19731
diff
changeset
|
28 ## |
7503499a252b
doc: Update docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19731
diff
changeset
|
29 ## The colormap is scaled so that the entries of the matrix occupy the entire |
7503499a252b
doc: Update docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19731
diff
changeset
|
30 ## colormap. If @code{@var{climits} = [@var{lo}, @var{hi}]} is given, then |
7503499a252b
doc: Update docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19731
diff
changeset
|
31 ## that range is set to the @qcode{"clim"} of the current axes. |
3651 | 32 ## |
33 ## The axis values corresponding to the matrix elements are specified in | |
4403 | 34 ## @var{x} and @var{y}, either as pairs giving the minimum and maximum |
35 ## values for the respective axes, or as values for each row and column | |
15683
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
36 ## of the matrix @var{img}. |
7189 | 37 ## |
14001
5f0bb45e615c
doc: Update documentation for functions returning a graphics handle h (Bug #34761)
Rik <octave@nomad.inbox5.com>
parents:
11589
diff
changeset
|
38 ## The optional return value @var{h} is a graphics handle to the image. |
17689
dd8db3f1c1da
doc: Add information about High-Level/Low-Level calling forms for image, imagesc.
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
39 ## |
dd8db3f1c1da
doc: Add information about High-Level/Low-Level calling forms for image, imagesc.
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
40 ## Calling Forms: The @code{imagesc} 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:
17281
diff
changeset
|
41 ## 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:
17281
diff
changeset
|
42 ## 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:
17281
diff
changeset
|
43 ## 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:
17281
diff
changeset
|
44 ## 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:
17281
diff
changeset
|
45 ## and inserts it in the current axes. |
dd8db3f1c1da
doc: Add information about High-Level/Low-Level calling forms for image, imagesc.
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
46 ## |
8286
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7650
diff
changeset
|
47 ## @seealso{image, imshow, caxis} |
3373 | 48 ## @end deftypefn |
559 | 49 |
3202 | 50 ## Author: Tony Richardson <arichard@stark.cc.oh.us> |
2312 | 51 ## Created: July 1994 |
52 ## Adapted-By: jwe | |
904 | 53 |
15683
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
54 function h = imagesc (varargin) |
7189 | 55 |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
56 [hax, varargin, nargin] = __plt_get_axis_arg__ ("imagesc", varargin{:}); |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
57 |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
58 chararg = find (cellfun ("isclass", varargin, "char"), 1, "first"); |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
59 |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
60 do_new = true; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
61 if (nargin == 0) |
7189 | 62 print_usage (); |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
63 elseif (chararg == 1) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
64 ## Low-Level syntax |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
65 do_new = false; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
66 img = x = y = climits = []; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
67 elseif (nargin == 1 || chararg == 2) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
68 img = varargin{1}; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
69 x = y = climits = []; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
70 elseif (nargin == 2 || chararg == 3) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
71 img = varargin{1}; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
72 climits = varargin{2}; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
73 x = y = []; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
74 elseif (nargin == 3 || chararg == 4) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
75 x = varargin{1}; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
76 y = varargin{2}; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
77 img = varargin{3}; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
78 climits = []; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
79 elseif (nargin == 4 || chararg == 5) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
80 x = varargin{1}; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
81 y = varargin{2}; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
82 img = varargin{3}; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
83 climits = varargin{4}; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
84 endif |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
85 |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
86 oldfig = []; |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
87 if (! isempty (hax)) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
88 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
|
89 endif |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
90 unwind_protect |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
91 if (do_new) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
92 hax = newplot (hax); |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
93 elseif (isempty (hax)) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
94 hax = gca (); |
7189 | 95 endif |
17692
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
96 |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
97 if (do_new) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
98 htmp = image (x, y, img, "cdatamapping", "scaled", varargin{chararg:end}); |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
99 else |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
100 htmp = image ("cdatamapping", "scaled", varargin{:}); |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
101 endif |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
102 |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
103 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
|
104 ## use given climits or guess them from the matrix |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
105 if (numel (climits) == 2 && climits(1) <= climits(2)) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
106 set (hax, "clim", climits); |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
107 elseif (! isempty (climits)) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
108 error ("imagesc: CLIMITS must be in form [lo, hi]"); |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
109 endif |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
110 endif |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
111 unwind_protect_cleanup |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
112 if (! isempty (oldfig)) |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
113 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
|
114 endif |
38cf56b77274
Overhaul image, imagesc to use newplot and support low-level invocation form.
Rik <rik@octave.org>
parents:
17689
diff
changeset
|
115 end_unwind_protect |
7189 | 116 |
117 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:
14359
diff
changeset
|
118 h = htmp; |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
119 endif |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
120 |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
121 endfunction |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
122 |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
123 |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
124 %!demo |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
125 %! clf; |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
126 %! colormap ("default"); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
127 %! img = 1 ./ hilb (11); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
128 %! x = y = -5:5; |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
129 %! subplot (2,2,1); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
130 %! h = imagesc (x, y, img); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
131 %! 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:
14359
diff
changeset
|
132 %! title ("imagesc (x, y, img)"); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
133 %! subplot (2,2,2); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
134 %! h = imagesc (-x, y, img); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
135 %! title ("imagesc (-x, y, img)"); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
136 %! subplot (2,2,3); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
137 %! h = imagesc (x, -y, img); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
138 %! title ("imagesc (x, -y, img)"); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
139 %! 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:
14359
diff
changeset
|
140 %! subplot (2,2,4); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
141 %! h = imagesc (-x, -y, img); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
142 %! title ("imagesc (-x, -y, img)"); |
559 | 143 |
15683
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
144 %!demo |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
145 %! clf; |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
146 %! colormap ("default"); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
147 %! g = 0.1:0.1:10; |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
148 %! h = g'*g; |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
149 %! imagesc (g, g, sin (h)); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
150 %! hold on; |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
151 %! imagesc (g, g+12, cos (h/2)); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
152 %! axis ([0 10 0 22]); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
153 %! hold off; |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
154 %! title ("two consecutive images"); |
6368 | 155 |
15683
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
156 %!demo |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
157 %! clf; |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
158 %! colormap ("default"); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
159 %! g = 0.1:0.1:10; |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
160 %! h = g'*g; |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
161 %! imagesc (g, g, sin (h)); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
162 %! hold all; |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
163 %! plot (g, 11.0 * ones (size (g))); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
164 %! imagesc (g, g+12, cos (h/2)); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
165 %! axis ([0 10 0 22]); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
166 %! hold off; |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
167 %! title ("image, line, image"); |
559 | 168 |
15683
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
169 %!demo |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
170 %! clf; |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
171 %! colormap ("default"); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
172 %! g = 0.1:0.1:10; |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
173 %! h = g'*g; |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
174 %! plot (g, 10.5 * ones (size (g))); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
175 %! hold all; |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
176 %! imagesc (g, g, sin (h)); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
177 %! plot (g, 11.0 * ones (size (g))); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
178 %! imagesc (g, g+12, cos (h/2)); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
179 %! plot (g, 11.5 * ones (size (g))); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
180 %! axis ([0 10 0 22]); |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
181 %! hold off; |
806ea52af230
Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents:
14359
diff
changeset
|
182 %! title ("line, image, line, image, line"); |
7189 | 183 |