[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Better limit behavior for images
From: |
John W. Eaton |
Subject: |
Better limit behavior for images |
Date: |
Wed, 28 Feb 2007 17:08:03 -0500 |
On 24-Feb-2007, Daniel J Sebald wrote:
| Another patch that improves the automatic limits for figures with images.
For example, here's that four image example again, but this time without the
need for axis().
|
| A = loadimage("default.img");
| [size_y, size_x] = size(A);
| X = ones(1,size_y)'*[1:size_x];
| Y = [1:size_y]'*ones(1,size_x);
| fig1 = figure();
| set(fig1,"visible","off")
| image(X, Y, A);
| hold on;
| image(X+size_x, Y, fliplr(A));
| image(X, Y+size_y, flipud(A));
| image(X+size_x, Y+size_y, flipud(fliplr(A)));
| ocean(64);
| set(fig1,"visible","on");
Without the call to axis I'm no longer getting four separate images
for the above code. Instead each image is apparently plotted on top
of the last.
I applied the patch anyway since it doesn't seem to break anything.
Can you please update and see if it works correctly for you?
| + xminp = min (xminp, min (img_xdata((img_xdata - dx/2)>0)) -
dx/2);
It is passed as the min_pos argument of get_axis_limits:
function lim = get_axis_limits (min_val, max_val, min_pos, logscale)
## FIXME -- this needs to make "nice" limits from the actual max and
## min of the data. For log plots, we will also need the smallest
## strictly positive value, which we aren't currently computing and
## caching above.
jwe