@@ -570,7 +570,11 @@ function validate(obj)
570570 ax = findobj(obj .State .Figure .Handle ,' Type' ,' axes' ,' -and' ,{' Tag' ,' ' ,' -or' ,' Tag' ,' PlotMatrixBigAx' ,' -or' ,' Tag' ,' PlotMatrixScatterAx' , ' -or' ,' Tag' ,' PlotMatrixHistAx' });
571571
572572 if isempty(ax )
573- ax = gca ;
573+ try
574+ ax = get(obj .State .Figure .Handle ,' Children' );
575+ catch
576+ ax = gca ;
577+ end
574578 end
575579
576580 % ---------- checking the overlaping of the graphs ----------%
@@ -647,7 +651,9 @@ function validate(obj)
647651 nprev = length(plots ) - np + 1 ;
648652
649653 % update the plot fields
650- if ~strcmpi(getGraphClass(plots(nprev )), ' light' )
654+ plotClass = lower(getGraphClass(plots(nprev )));
655+
656+ if ~ismember(plotClass , {' light' , ' polaraxes' })
651657 obj.State.Figure.NumPlots = obj .State .Figure .NumPlots + 1 ;
652658 obj .State .Plot(obj .State .Figure .NumPlots ).Handle = handle(plots(nprev ));
653659 obj .State .Plot(obj .State .Figure .NumPlots ).AssociatedAxis = handle(ax(axrev ));
@@ -658,11 +664,16 @@ function validate(obj)
658664 end
659665
660666 % this works for pareto
661- if length(plots ) == 0 & obj .State .Figure .NumPlots ~= 0
662- isPareto = length(ax ) >= 2 & obj .State .Figure .NumPlots >= 2 ;
663- isBar = strcmpi(lower(obj .State .Plot(obj .State .Figure .NumPlots ).Class), ' line' );
664- isLine = strcmpi(lower(obj .State .Plot(obj .State .Figure .NumPlots - 1 ).Class), ' bar' );
665- isPareto = isPareto & isBar & isLine ;
667+ if length(plots ) == 0
668+
669+ try
670+ isPareto = length(ax ) >= 2 & obj .State .Figure .NumPlots >= 2 ;
671+ isBar = strcmpi(lower(obj .State .Plot(obj .State .Figure .NumPlots ).Class), ' line' );
672+ isLine = strcmpi(lower(obj .State .Plot(obj .State .Figure .NumPlots - 1 ).Class), ' bar' );
673+ isPareto = isPareto & isBar & isLine ;
674+ catch
675+ isPareto = false ;
676+ end
666677
667678 if isPareto
668679 obj .State .Plot(obj .State .Figure .NumPlots ).AssociatedAxis = handle(ax(axrev ));
@@ -784,6 +795,9 @@ function validate(obj)
784795 else
785796 if ~obj .PlotlyDefaults .isTernary
786797 updateAnnotation(obj ,n );
798+ if obj .State .Figure .NumAxes == 1
799+ obj.PlotOptions.CleanFeedTitle = false ;
800+ end
787801 end
788802 end
789803 catch
0 commit comments