2
votes

So if i have plotted some data in gnuplot as a boxplot (set style data gnuplot), and I have outliers having the same value, then they are plotted as dots horizontally at the same place.

How can I set that horizontal distance?

So for example I have the datafile data.dat

1
1
1
1
1
1
1
1
1
1
1
1
9
9

and plot it using

set style data boxplot
plot 'data.dat' using (1):1
set yrange [0:10]

How can I set then the distance between the two points at y=9?

2
No, you cannot change that distance. The position of duplicate outliers depends only on the selected pointsize. There if, however, a difference in the point distance between the command plot 'data.dat' using (1):1 and plot 'data.dat' using (1):1 pointsize 1. But I suspect this shouldn't happen and is a bug... - Christoph
That helps already a lot! Now using pointtype 0 and pointsize 1 in a logscale, the spacing isn't that bad. - overseas

2 Answers

3
votes

No, you cannot change that distance, The position of duplicate outliers depends on the selected pointsize. There is, however, a difference in the point distance between the command

plot 'data.dat' using (1):1 

and

plot 'data.dat' using (1):1 pointsize 1.

But I suspect this shouldn't happen and might be categorized as bug.

set style data boxplot
set yrange[0:10]

plot 'data.dat' using (1):1 title 'no explicit point size',\
     '' using (2):1 pointsize 1 title 'point size 1'

enter image description here

1
votes

Christoph, you were on the right track, just didn't go far enough. At least with Ver. 5.0, the following worked for me:

set style boxplot outliers pointtype 6
plot 'data.dat' using (1):2:(0):1 pointsize .1

I was plotting a few thousand points, and this resulted in a much more reasonable plot, given that there could be tens of duplicates. Outliers that don't overlap