0
$\begingroup$

I'm need to create boxplots to analyse and evaluate test results. Since I program in Java this answer convinced me to use JFreeChart. The BoxAndWhisker chart seemed similar to what I wanted.

I spent the day to implement and create the dataset and the plot, but I'm confused with the result and also not very satisfied.

This is what I expected (the appearance/style not the values): What I expected This is what I got: what I got

Honestly, all these colorful circles remind me of Micky Mouse, but not of a scientific boxplot. Could you explain to me what all these circles and arrows mean? My guess is the black circle is the average, but I don't know about the two empty circles and the arrows. Also is it possible to change the appearance so it's more similar to the above figure? I saw some options in the BoxAndWhiskerRenderer, but they didn't seem to be what I want.

$\endgroup$
  • $\begingroup$ Is there is no documentation? Is the source code visible? Rule of thumb: Don't use code unless the answer is at least one Yes, except at your peril. Wild guesses: the arrows indicate higher values not plotted. Not the question, but with the data often strongly skewed like this, you need to look at them on a transformed scale, especially if the outliers can't be plotted. More generally, please see advice on software-related questions in the Help Center. How to use software to get something (different) is off-topic here. $\endgroup$ – Nick Cox Feb 3 '15 at 18:27
  • $\begingroup$ The double circles are mysterious. Could it be that they are intended to be eyes??? I hope not. $\endgroup$ – Nick Cox Feb 3 '15 at 18:29
  • 1
    $\begingroup$ As this is your own data, you can surely (1) calculate the means as a check; (2) check for values not plotted; (3) look at values at or near the levels of the paired circles. $\endgroup$ – Nick Cox Feb 3 '15 at 18:39
  • $\begingroup$ It may be that the double circles represent points with the same data value. My guess is the triangle denotes "there's data values off the end of the plotted range of values" (Δ = "there's data up this way" ). But you'd need to check the documentation. $\endgroup$ – Glen_b Feb 4 '15 at 0:54
  • $\begingroup$ There's just the API, but no other documentation I could find. $\endgroup$ – CGFoX Feb 4 '15 at 9:43
0
$\begingroup$

I used this code to modify the boxplots appearance:

MyBoxAndWhiskerRenderer renderer = new MyBoxAndWhiskerRenderer();   
    renderer.setFillBox(true);
    renderer.setSeriesPaint(0, Color.WHITE);
    renderer.setSeriesPaint(1, Color.LIGHT_GRAY);
    renderer.setSeriesOutlinePaint(0, Color.BLACK);
    renderer.setSeriesOutlinePaint(1, Color.BLACK);
    renderer.setUseOutlinePaintForWhiskers(true);   
    Font legendFont = new Font("SansSerif", Font.PLAIN, 16);
    renderer.setLegendTextFont(0, legendFont);
    renderer.setLegendTextFont(1, legendFont);
    renderer.setMedianVisible(true);
    renderer.setMeanVisible(false);

MyBoxAndWhiskerRenderer just copies most of the code from the DefaultBoxAndWhiskerRenderer, but does not paint outliers and far outs.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.