title: gnuplot: Row stacked bar graph with error bar
body: <p>I am new to gnuplot. I want to generate graph from data points with three components and standard deviation.
  My data looks like this:</p>
  
  <pre><code>TYPE1   15  20  65  5
  TYPE2   20  20  60  4
  TYPE3   10  30  60  6
  TYPE4   30  30  40  5
  </code></pre>
  
  <p>I want to plot a rowstacked bar for each TYPE with the 3 components stacked and an errobar at the top.
  I wrote the following script to do this:</p>
  
  <pre><code>set terminal png
  set output "sample.png"
  set boxwidth 0.75 relative
  set style fill   pattern 0 border
  set style histogram rowstacked
  set style data histograms
  set xtics 1000 nomirror
  set ytics 100 nomirror
  set noytics
  set mxtics 2
  set mytics 2
  set ytics 100
  set yrange [0:150]
  set ylabel "Y"
  set xlabel "X"
  set title "Sample graph"
  plot 'data.dat' using (100*column(2)/(column(2)+column(3)+column(4))) t "A" , '' using (100*column(3)/(column(2)+column(3)+column(4))) t "B" , '' using (100*column(4)/(column(2)+column(3)+column(4))):xtic(1) t "C" 
  </code></pre>
  
  <p>This produced a graph which looks like this: <img src="https://i.stack.imgur.com/yfSGg.png" alt="Click Here">.</p>
  
  <p>But I am not able to get the errorbar on the top of each bar with deviation values in column 5. I tried different ways using rowstacked and errorbar styled bar graphs but had no luck.</p>