3

i've got some questions regarding outlier rules in JFreeChart:

  1. Is it possible to influence the outlier rules in a JFreeChart Boxplot?
  2. I would assume that the default setting for outliers is Q3+1.5*IQR and Q1-1.5*IQR?
  3. Is there a default rule for extreme values like Q3+3*IQR and Q1-3*IQR?

  4. Maybe this should be a separate Question but how do you set the symbol for outliers? The default setting is a circle which is too big for my preference.

My data is in a DefaultBoxAndWhiskerCategoryDataset and i am not even sure if i need to change any of the default settings. Nevertheless it would be nice to know what exactly the default settings are ;)

dennis
  • 683
  • 2
  • 5
  • 18

2 Answers2

2

The actual place where these values are calculated is in the BoxAndWhiskerCalculator class, in the BoxAndWhiskerCalculator function.

In essence outliers are the values outside the "regular range", defined as the maximum range defined by values between Q1-2*IQR and Q1-1.5*IQR on the lower side, and between Q3+1.5*IQR and Q3+2*IQR on the upper side.

The far-out range for extreme values is below Q1-2*IQR or above Q3+2*IQR.

By changing these criteria in the above-mentioned function you can change the behaviour of the plot.

The symbols are drawn in the BoxAndWhiskerRenderer class, in particular in the drawEllipse, drawMultipleEllipse, drawHighFarOut and drawLowFarOut methods.

Pablo Rodriguez
  • 582
  • 4
  • 18
2

Use the source, Luke. DefaultBoxAndWhiskerCategoryDataset calculates the outlier values, and the corresponding BoxAndWhiskerRenderer draws them. Click on either class name link to see the source code.

trashgod
  • 203,806
  • 29
  • 246
  • 1,045
  • What is he supposed to do with it? Does he have to create his own Renderer to do it? Are there no methods provided to change the outliers' symbol? – stefanbschneider Feb 04 '15 at 22:05
  • @CGFoX: I don't see any methods to change the outliers' shape; the `BoxAndWhiskerCategoryDataset` controls the calculation; return an empty `List` to hide them. – trashgod Feb 04 '15 at 22:39
  • Are the whiskers calculated as Q1-1.5*IQR and Q3+1.5*IQR? That's what it seems to me in the code, but I want to make sure. – stefanbschneider Feb 08 '15 at 10:24