1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
R=0/10/0/100
J=X5i/5i
PS=error-bar-gmt.ps
PDF=error-bar-gmt.pdf

awk 'BEGIN{for(i=2;i<10;i++){print i,i*i}}' > tmp.lst

psxy -R$R -J$J -K -T > $PS
psxy tmp.lst -R -J -K -O -B1:"X-axis":/10:"Y-axis":WSen -W1p,"--" >> $PS
awk '{print $1,$2,3.5,1}' tmp.lst | psxy -R -J -K -O -Ey/3p >> $PS
psxy tmp.lst -R -J -K -O -Si0.5c -Gblack >> $PS
psxy -R -J -O -T>> $PS

ps2pdf $PS $PDF

errorbar