# 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 --git a/scripts/plot/subplot.m b/scripts/plot/subplot.m --- a/scripts/plot/subplot.m +++ b/scripts/plot/subplot.m @@ -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;