1
votes

I have a problem plotting a histogram with errorbars. The script is:

set style data histogram
set style histogram errorbars gap 1 lw 1
set yrange[0:35000]
set xrange[0:5]
set datafile separator ","

plot "50_data.csv" u 4:7:xtics(2) t "50 Pees", \
"75_data.csv" u 4:7 t "75 Peers", "100_data.csv" u 4:7 t "100 Peers"

The data for the boxes is in column 4 and the data for the errorbars in column 7.

This is the result: Plot

As you can see, the errorbars are not matching their boxes. It seems that the errorbars start on xtic 0, while the boxes on xtic 1. But I am not sure.

1

1 Answers

2
votes

I've solved the problem. The problem was that the first line of the file was not skipped.

Skipping first line did it for me:

set key autotitle columnhead