diff --git a/plotly/plotlyfig.m b/plotly/plotlyfig.m index 1183a3a2..1b082e02 100644 --- a/plotly/plotlyfig.m +++ b/plotly/plotlyfig.m @@ -486,9 +486,9 @@ function validate(obj) temp_ax = ax; deleted_idx = 0; for i = 1:length(ax) for j = i:length(ax) - if ((mean(eq(ax(i).Position, ax(j).Position)) == 1) && (i~=j)) + if ((mean(eq(ax(i).Position, ax(j).Position)) == 1) && (i~=j) && strcmp(ax(i).Children.Type, 'histogram')) temp_plots = findobj(temp_ax(i),'-not','Type','Text','-not','Type','axes','-depth',1); - if ~ischar(temp_plots.FaceAlpha) + if isprop(temp_plots, 'FaceAlpha') update_opac(i) = true; else update_opac(i) = false;