tbuda
tbuda

Reputation: 43

Gnuplot - cannot change colors of bars

Given dataset:

0 t1 0.52
1 t2 0.66
2 t3 0.58
3 t4 0.57
4 t5 0.68
5 t6 0.61
6 t7 0.55
7 t8 0.52
8 t9 0.58
9 t10 0.50
10 t11 0.59

I cannot manage to get the colors of the bars to change. What I'm trying below is to color green the highest score which happens on line 4. Please have a look over the below:

set terminal postscript eps enhanced 20
set output "edscore2_joint.eps"
set style line 1 lc rgb "#5F9EA0"
set style line 2 lc rgb "#DC143C"
set style line 3 lc rgb "green"
set yrange [0:1]
set ylabel "ed_{score}"
set xlabel "Technique"
set style fill solid
set boxwidth 0.5
set xtics rotate by -45



plot "edscore2_joint.dat" using 1:3:xtic(2) with boxes  ls 1 fillstyle pattern 1 notitle ,\
    "edscore2_joint.dat" every ::4::4 using 1:3:xtic(2) with boxes ls 3 fillstyle pattern 2  notitle ,\
 "edscore2_joint.dat" using 1:($3+0.05):3 with labels notitle

Upvotes: 1

Views: 134

Answers (1)

Joce
Joce

Reputation: 2342

The terminal postscript is monochrome by default. Use either the option color, or, if you have a recent enough gnuplot version, use the terminal epscairo.

Upvotes: 1

Related Questions