# HG changeset patch # User Rik # Date 1402434189 25200 # Node ID 87c3848cf3c0a5a16c0613ce8ef876d6900c6d54 # Parent 096b1a159d1fddf227b466c8b74fbfc05ab0a385 Fix bug when hggroup used with primitive graphic object (bug #42532). * image.m, text.m, line.m, patch.m: __plt_get_axis_arg__ will return axis and hggroup when 'parent' property is used. Select the first returned object which is the axes, rather than passing both axis and hggroup to further plot subroutines. diff -r 096b1a159d1f -r 87c3848cf3c0 scripts/image/image.m --- a/scripts/image/image.m Tue Jun 10 09:08:33 2014 -0700 +++ b/scripts/image/image.m Tue Jun 10 14:03:09 2014 -0700 @@ -111,6 +111,8 @@ hax = newplot (hax); elseif (isempty (hax)) hax = gca (); + else + hax = hax(1); endif htmp = __img__ (hax, do_new, x, y, img, varargin{chararg:end}); diff -r 096b1a159d1f -r 87c3848cf3c0 scripts/plot/appearance/text.m --- a/scripts/plot/appearance/text.m Tue Jun 10 09:08:33 2014 -0700 +++ b/scripts/plot/appearance/text.m Tue Jun 10 14:03:09 2014 -0700 @@ -129,6 +129,8 @@ if (isempty (hax)) hax = gca (); + else + hax = hax(1); endif ## Position argument may alse be in PROP/VAL pair diff -r 096b1a159d1f -r 87c3848cf3c0 scripts/plot/draw/line.m --- a/scripts/plot/draw/line.m Tue Jun 10 09:08:33 2014 -0700 +++ b/scripts/plot/draw/line.m Tue Jun 10 14:03:09 2014 -0700 @@ -49,6 +49,8 @@ if (isempty (hax)) hax = gca (); + else + hax = hax(1); endif htmp = __line__ (hax, varargin{:}); diff -r 096b1a159d1f -r 87c3848cf3c0 scripts/plot/draw/patch.m --- a/scripts/plot/draw/patch.m Tue Jun 10 09:08:33 2014 -0700 +++ b/scripts/plot/draw/patch.m Tue Jun 10 14:03:09 2014 -0700 @@ -80,6 +80,8 @@ if (isempty (hax)) hax = gca (); + else + hax = hax(1); endif [htmp, failed] = __patch__ (hax, varargin{:});