Mercurial > octave-nkf
comparison scripts/image/__img__.m @ 7276:1e8e64d71e34
[project @ 2007-12-10 20:09:59 by jwe]
author | jwe |
---|---|
date | Mon, 10 Dec 2007 20:09:59 +0000 |
parents | a1dbe9d80eee |
children | 86ba621332ff |
comparison
equal
deleted
inserted
replaced
7275:c099705f1aa7 | 7276:1e8e64d71e34 |
---|---|
30 | 30 |
31 ## Author: Tony Richardson <arichard@stark.cc.oh.us> | 31 ## Author: Tony Richardson <arichard@stark.cc.oh.us> |
32 ## Created: July 1994 | 32 ## Created: July 1994 |
33 ## Adapted-By: jwe | 33 ## Adapted-By: jwe |
34 | 34 |
35 function h = __img__ (x, y, img) | 35 function h = __img__ (x, y, img, varargin) |
36 | 36 |
37 newplot (); | 37 newplot (); |
38 | 38 |
39 if (isempty (img)) | 39 if (isempty (img)) |
40 error ("__img__: matrix is empty"); | 40 error ("__img__: matrix is empty"); |
51 xlim = [x(1), x(end)]; | 51 xlim = [x(1), x(end)]; |
52 ylim = [y(1), y(end)]; | 52 ylim = [y(1), y(end)]; |
53 | 53 |
54 ca = gca (); | 54 ca = gca (); |
55 | 55 |
56 tmp = __go_image__ (ca, "cdata", img, "xdata", xlim, "ydata", ylim); | 56 tmp = __go_image__ (ca, "cdata", img, "xdata", xlim, "ydata", ylim, |
57 varargin {:}); | |
57 | 58 |
58 set (ca, "view", [0, 90]); | 59 set (ca, "view", [0, 90]); |
59 | 60 |
60 if (strcmp (get (ca, "nextplot"), "replace")) | 61 if (strcmp (get (ca, "nextplot"), "replace")) |
61 set (ca, "ydir", "reverse"); | 62 set (ca, "ydir", "reverse"); |