Matlab - Extract values โ€‹โ€‹from boxplot

I want to extract values โ€‹โ€‹from the boxplot built-in function. A1 has three extra large values โ€‹โ€‹(1,000,000), and the correct maximum value is 273.

a = boxplot(A1) a = 173.0043 174.0028 175.0033 176.0027 177.0032 178.0027 179.0031 

I tried this, but I donโ€™t understand what these values โ€‹โ€‹are, these are not the emissions themselves, nor the emissions index.

findobj(gcf,'tag','Outliers'); returns only 179.0031

How to extract outliers or their indices from boxplot?

+4
source share
1 answer

BOXPLOT returns an array of descriptors for different graphic objects.

In the default parameters ( plotstyle set to outline , etc.), the output is an array of 7 x M arrays, where M is the number of boxplot groups, each of which has the following 7 descriptors:

  • Upper whisker
  • lower whisker
  • Upper adjacent value
  • Lower adjacent value
  • Box
  • Median
  • Drop down

With different parameters, boxplot can return a different number of descriptors, so it's best to find what you need by the tag.

To retrieve data, you need to access the Data property for a specific object, if that property exists.

 h = findobj(gcf,'tag','Outliers'); xdata = get(h,'XData'); ydata = get(h,'YData'); 
+9
source

Source: https://habr.com/ru/post/1401705/


All Articles