comparison scripts/plot/appearance/axis.m @ 18668:01aa90ece9a4 stable

axis.m: Fix regression setting tight limits on non-image objects. * axis.m: Don't apply image pixel calculations to non-image objects.
author Rik <rik@octave.org>
date Wed, 23 Apr 2014 22:40:24 -0700
parents bf0d2e51c8f0
children 78fac67300e8
comparison
equal deleted inserted replaced
18659:3277514f36da 18668:01aa90ece9a4
339 data = {data}; 339 data = {data};
340 endif 340 endif
341 341
342 ## Extend image data one pixel 342 ## Extend image data one pixel
343 idx = strcmp (types, "image"); 343 idx = strcmp (types, "image");
344 if (! isempty (idx) && (ax == "x" || ax == "y")) 344 if (any (idx) && (ax == "x" || ax == "y"))
345 imdata = data(idx); 345 imdata = data(idx);
346 px = arrayfun (@__image_pixel_size__, kids(idx), "uniformoutput", false); 346 px = arrayfun (@__image_pixel_size__, kids(idx), "uniformoutput", false);
347 ipx = ifelse (ax == "x", 1, 2); 347 ipx = ifelse (ax == "x", 1, 2);
348 imdata = cellfun (@(x,dx) [(min (x) - dx(ipx)), (max (x) + dx(ipx))], 348 imdata = cellfun (@(x,dx) [(min (x) - dx(ipx)), (max (x) + dx(ipx))],
349 imdata, px, "uniformoutput", false); 349 imdata, px, "uniformoutput", false);