# HG changeset patch # User Rik # Date 1349893901 25200 # Node ID 623cce4577b3d2ef7d0cf43197a104d91e7165c1 # Parent c49d891eb2630b709f758e3aee92cd71b10b8a6c Fix legend and subplot interaction (bug #37499) * subplot.m: Replace axis position exact match test with matching to within 1*eps to avoid round-off errors. diff -r c49d891eb263 -r 623cce4577b3 scripts/plot/subplot.m --- a/scripts/plot/subplot.m Mon Oct 08 08:01:07 2012 -0400 +++ b/scripts/plot/subplot.m Wed Oct 10 11:31:41 2012 -0700 @@ -206,7 +206,7 @@ else objpos = get (child, "outerposition"); endif - if (all (objpos == pos) && ! replace_axes) + if (all (abs (objpos - pos) < eps) && ! replace_axes) ## If the new axes are in exactly the same position as an ## existing axes object, use the existing axes. found = true;