From a623d24264f826a24ee8ee2873f0a9e91f83e0fe Mon Sep 17 00:00:00 2001 From: Andreas Husch Date: Thu, 3 Aug 2017 14:02:26 +0200 Subject: [PATCH 1/2] Add support for hggroups Move upwards graphics hierarchy --- fig2idtf/preprocess/u3d_pre_surface.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fig2idtf/preprocess/u3d_pre_surface.m b/fig2idtf/preprocess/u3d_pre_surface.m index 9dc5fc9..ed78040 100644 --- a/fig2idtf/preprocess/u3d_pre_surface.m +++ b/fig2idtf/preprocess/u3d_pre_surface.m @@ -166,6 +166,9 @@ %% indexed color to RGB true color ax = get(h, 'Parent'); +while(~strcmp(ax.Type, 'axes')) % e.g. hggroup + ax = get(ax, 'Parent'); % move upwards +end realcolor = scaled_ind2rgb(cdata, ax); function [realcolor] = scaled_ind2rgb(cdata, ax) From c6b90494c7534db50f3ee24d89f7568218972892 Mon Sep 17 00:00:00 2001 From: Andreas Husch Date: Thu, 3 Aug 2017 13:54:06 +0200 Subject: [PATCH 2/2] Add support for hggroups MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove ‘flat’ options as there might be relevant objects down the hggroup hierarchy --- fig2idtf/preprocess/u3d_pre_patch.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fig2idtf/preprocess/u3d_pre_patch.m b/fig2idtf/preprocess/u3d_pre_patch.m index 190266f..caa44cd 100644 --- a/fig2idtf/preprocess/u3d_pre_patch.m +++ b/fig2idtf/preprocess/u3d_pre_patch.m @@ -45,7 +45,7 @@ sh = findobj('flat', 'type', 'patch'); else objs = get(ax, 'Children'); - sh = findobj(objs, 'flat', 'type', 'patch'); + sh = findobj(objs, 'type', 'patch'); %HA: was ''flat' end if isempty(sh)