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) 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)