gnuplot - histogram with errorbars, pb with the titles of the columns -
these data : table11-mol+func.dat
#mol pbe optpbe optb86b beef exp incertitudebeef 0 0 pbe-pbe optpbe-vdw1 optb86b-vdw1 beef-vdw2 exp incert.beef 0 1 0.014 0.226 0.210 0.125 0.155 0.10444 0 2 0.033 0.362 0.392 0.223 0 0.16794 0 3 1.742 1.755 2.152 1.432 1.36 0.29116 0 4 1.206 1.441 1.724 1.115 0 0.17857 0 5 0.934 1.533 1.857 1.063 0 0.30034 0 6 0.777 1.514 1.843 0.959 1.295 0.31264 0 7 2.018 2.298 2.858 1.751 0 0.37737 0 8 1.084 1.648 2.336 1.033 1.762 0.60643 0 9 1.504 2.355 3.451 1.449 2.694 1.0138 0 this code :
set key left set auto x set ylabel "- e_{ads} (ev)" font "times-roman, 18" set yrange [0:3.5] set ytics (0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5) font "times-roman, 18" set style data histograms set style histogram errorbars lw 1 set style fill solid border -1 set boxwidth 0.9 set xtics ("methane" 0, "ethane" 1, "ethylidyne" 2, "ethylene" 3, "butene" 4, "cyclohexene" 5, "butadiene" 6, "benzene" 7, "naphtalene" 8) font "times-roman, 15" set xtic nomirror rotate -45 scale 0 set grid y plot 'table11-mol+func.dat' using 2:8 ti col, '' u 3:8 ti col, '' u 4:8 ti col, '' u 5:7 ti col, '' u 6:8 ti col this gives histogram wrong title each color
so tried add them "with hands" line instead of last 1 :
plot 'table11-mol+func.dat' using 2:8 ti 'pbe', '' u 3:8 ti 'optpbe', '' u 4:8 ti 'optb86b', '' u 5:7 ti 'beef', '' u 6:8 ti 'exp' and messes histogram, weird stuffs appear on diagram, , adds xtic , bars...
somebody me ?
it's more weird because use work month ago... maybe it's because have new version of gnuplot ?
gnuplot fails select correct column title from. tries use 8th column, given second column in using option, although gives error estimate , not y-value. must explicitely give column number e.g. ti col(3):
set key left set yrange [0:3.5] set ytics 0.5 set style data histograms set style histogram errorbars lw 1 set style fill solid border -1 set boxwidth 0.9 set xtics ("methane" 0, "ethane" 1, "ethylidyne" 2, "ethylene" 3, "butene" 4, "cyclohexene" 5, "butadiene" 6, "benzene" 7, "naphtalene" 8) set xtic nomirror rotate -45 scale 0 set grid y plot 'table11-mol+func.dat' u 2:8 t col(2), '' u 3:8 t col(3), '' u 4:8 t col(4), '' u 5:7 t col(5), '' u 6:8 t col(6) 
Comments
Post a Comment