function riverplot_set_ribbon_property(ribbons, propertyname, propertyval)
%
% riverplot_set_ribbon_property(ribbons, propertyname, propertyval)
%
% e.g., riverplot_set_ribbon_property(ribbons, 'LineStyle', 'none')

if ~iscell(ribbons) || isempty(ribbons) || all(all(cellfun(@isempty, ribbons)))
    return % nothing to do
end

allribbons = cat(1, ribbons{:});

% all ribbon patches
allpatches = cat(1, allribbons(:).patchh);
%set(allpatches, 'LineStyle', 'none');
set(allpatches, propertyname, propertyval);

% 
% for i = 1:length(allribbons)
%     line1h{i} = allribbons(i).line1.h;
%     line2h{i} = allribbons(i).line2.h;
%     
% end
% 
% line1h = cat(1, line1h{:});
% line2h = cat(1, line2h{:});
% 
% set(line1h, 'Visible', 'off');
% set(line2h, 'Visible', 'off');


end % function
canlab
github-repos/MATLAB/canlab-CanlabCore/CanlabCore-af242e120f0480c4feaeea90471c015a14f1f60e/CanlabCore/Visualization_functions/riverplot/riverplot_set_ribbon_property.m
CanlabCore
github-repos/MATLAB/canlab-CanlabCore
af242e120f0480c4feaeea90471c015a14f1f60e