Skip to content

Commit

Permalink
Added control error message
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoRianiUNIPR committed Apr 22, 2024
1 parent e593920 commit 652b81b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions toolbox/utilities_stat/add2boxplot.m
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ function add2boxplot(Y,g)

% Find in current figure the objects which are tagged as outliers
objOutliers = findobj(gcf,'Tag','Outliers');

if isempty(objOutliers)
error('FSDA:add2boxplot:noTag','No figure found containing objects tagged as "Outliers"')
end

% Extract the x and y coordinates of the outliers
outliersYcoo = get(objOutliers,'YData');
outliersXcoo = get(objOutliers,'XData');
Expand Down

0 comments on commit 652b81b

Please sign in to comment.