gnuplot rowstacked histogram: how to put sum above bars
问题 This question is related to gnuplot histogram: How to put values on top of bars. I have a datafile file.dat : x y1 y2 1 2 3 2 3 4 3 4 5 and the gnuplot: set style data histogram; set style histogram rowstacked; plot newhistogram 'foo', 'file.dat' u 2:xtic(1) t col, '' u 3 t col; Now I want to place the sums of columns 2 and 3 above the bars. The obvious solution plot newhistogram 'foo', 'file.dat' u 2:xtic(1) t col, '' u 3 t col, \ '' u ($0-1):($2+$3+0.2):($2+$3) notitle w labels font "Arial