@@ -584,7 +584,11 @@ function validate(obj)
584584 ax = findobj(obj .State .Figure .Handle ,' Type' ,' axes' ,' -and' ,{' Tag' ,' ' ,' -or' ,' Tag' ,' PlotMatrixBigAx' ,' -or' ,' Tag' ,' PlotMatrixScatterAx' , ' -or' ,' Tag' ,' PlotMatrixHistAx' });
585585
586586 if isempty(ax )
587- ax = gca ;
587+ try
588+ ax = get(obj .State .Figure .Handle ,' Children' );
589+ catch
590+ ax = gca ;
591+ end
588592 end
589593
590594 % ---------- checking the overlaping of the graphs ----------%
@@ -661,7 +665,9 @@ function validate(obj)
661665 nprev = length(plots ) - np + 1 ;
662666
663667 % update the plot fields
664- if ~strcmpi(getGraphClass(plots(nprev )), ' light' )
668+ plotClass = lower(getGraphClass(plots(nprev )));
669+
670+ if ~ismember(plotClass , {' light' , ' polaraxes' })
665671 obj.State.Figure.NumPlots = obj .State .Figure .NumPlots + 1 ;
666672 obj .State .Plot(obj .State .Figure .NumPlots ).Handle = handle(plots(nprev ));
667673 obj .State .Plot(obj .State .Figure .NumPlots ).AssociatedAxis = handle(ax(axrev ));
@@ -672,11 +678,16 @@ function validate(obj)
672678 end
673679
674680 % this works for pareto
675- if length(plots ) == 0 & obj .State .Figure .NumPlots ~= 0
676- isPareto = length(ax ) >= 2 & obj .State .Figure .NumPlots >= 2 ;
677- isBar = strcmpi(lower(obj .State .Plot(obj .State .Figure .NumPlots ).Class), ' line' );
678- isLine = strcmpi(lower(obj .State .Plot(obj .State .Figure .NumPlots - 1 ).Class), ' bar' );
679- isPareto = isPareto & isBar & isLine ;
681+ if length(plots ) == 0
682+
683+ try
684+ isPareto = length(ax ) >= 2 & obj .State .Figure .NumPlots >= 2 ;
685+ isBar = strcmpi(lower(obj .State .Plot(obj .State .Figure .NumPlots ).Class), ' line' );
686+ isLine = strcmpi(lower(obj .State .Plot(obj .State .Figure .NumPlots - 1 ).Class), ' bar' );
687+ isPareto = isPareto & isBar & isLine ;
688+ catch
689+ isPareto = false ;
690+ end
680691
681692 if isPareto
682693 obj .State .Plot(obj .State .Figure .NumPlots ).AssociatedAxis = handle(ax(axrev ));
@@ -798,6 +809,9 @@ function validate(obj)
798809 else
799810 if ~obj .PlotlyDefaults .isTernary
800811 updateAnnotation(obj ,n );
812+ if obj .State .Figure .NumAxes == 1
813+ obj.PlotOptions.CleanFeedTitle = false ;
814+ end
801815 end
802816 end
803817 catch
0 commit comments