Ecterion
Ecterion

Reputation: 161

Gnuplot boxplot information

I don't know gnuplot so much and I didn't find valuable information about what I want. I would like to draw a box plot from a data file.

What I would like to do is to draw a boxplot (not an histogram). Actually I have xlsx files that I can convert to CSV but I don't know if we can use csv to draw a boxplot. The demos on gnuplot are not really explicit.

Upvotes: 0

Views: 1637

Answers (1)

Christoph
Christoph

Reputation: 48390

Here is a very simple example of a boxplot:

$data <<EOD
1
2
3
4
5
6
EOD

plot $data using (0):1 with boxplot

This does a boxplot using the values given in column 1, all statistical values are computed by gnuplot, and plots it at x-position 0. ($data is only a convenient way to describe inline data, plotting from a file with a single column work the same way with plot 'file.dat' using (0):1 with boxplot)

You can use as many columns as you want, like

$data <<EOD
1 1 1
2 2 4
3 3 5
4 3 5
5 4 6
6 6 6
EOD

set style data boxplot
plot $data using (0):1, '' using (1):2, '' using (2):3

(shorter would be plot for [i=1:3] $data using (i-1):i)

enter image description here

Upvotes: 1

Related Questions