Domanda

I am trying to get a boxplot with gnuplot 4.6 but I face some problems. I have tried to find an answer from several sources, I did not find it.

For instance, the following commands do not work

gnuplot> set style boxplot
               ^
     expecting 'data', 'function', 'line', 'fill', 'rectangle', or 'arrow'
gnuplot> set style boxplot outliers pointtype 7
                   ^
         expecting 'data', 'function', 'line', 'fill', 'rectangle', or 'arrow'

If I plot directly as states in the GNUPLOT manual page 45, like this

gnuplot> plot 'boxplotdata.dat' using (1):2

I just get on x=1, all points plotted like '+', but there is no boxplot at all. If do the processing and use the Candlesticks/whiskerplots, then it is ok, but I cannot get the outliers ...

My raw data is the following

32  0.521984
32  0.521801
32  0.512350
32  0.519136
32  0.518901
32  0.527961
32  0.506231
32  0.512615
32  0.526872
32  0.520300
32  0.511880
32  0.531184
32  0.510774
32  0.527602
32  0.520770
32  0.517887
32  0.527341
32  0.525647
32  0.525276
32  0.527341

How can I print out the outliers 'o'?

È stato utile?

Soluzione

In the gnuplot 4.6 manual, p45:

By default the whiskers extend from the ends of the box to the most distant point whose y value lies within 1.5 times the interquartile range.

So, the outliers must be 1.5 times greater, and you don't have any in the data (that's why we don't see them in the picture).

This works perfectly in my gnuplot 4.6 MS-Windows:

set style boxplot outliers pointtype 19
set style data boxplot
plot 'data' u 1:2

Check the Version, o try reinstall.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top