alien01
alien01

Reputation: 1332

Gnuplot histogram with errorbars (High and Low)

I am trying to create a histogram (barchart) with High and Low errors, using gnuplot. I have found this thread Gnuplot barchart histogram with errorbars Unfortunately it consists only from X value and X-error (2 vaues). Whats I would like to achieve is X value (average) and error bar consisting of High and Low values (total 3: avg, High and Low). How I can do this using gnuplot?example of what I am trying to do

My script is identical to the one mentioned in the Thread, I only changed some labels etc (simple cosmetic changes). My example dataset structure is as follows:

WikiVote 10 12 7

Upvotes: 1

Views: 5423

Answers (2)

alien01
alien01

Reputation: 1332

I have modified the code provided by mgilson, to achieve multiple histograms for a single X value. If anybody needs it here is the code.

plot 'stack_2.dat' u 2:3:4:xtic(1) w hist ti "Hadoop" linecolor rgb "#FF0000", '' u 5:6:7:xtic(1) w hist ti "Giraph" lt 1 lc rgb "#00FF00"

Here is the pattern

    #y_0 #min #max #y_1 #min #max
Dataset 4   3    8    6    5    9

Upvotes: 0

mgilson
mgilson

Reputation: 309821

If you have a very simple datafile:

#y ymin ymax
4   3    8

You can plot this datafile using:

set yrange [0:]
set style histogram errorbars gap 2 lw 1
plot 'datafile' u 1:2:3 w hist 

Upvotes: 3

Related Questions