From 8a0b8bedc7840ae622d3a0d57053f89c91eb7558 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de>
Date: Wed, 23 Sep 2015 19:02:04 +0200
Subject: [PATCH] plot error bars with same line thickness as the symbol

---
 TODO                 |  5 +++--
 pub/CHANGELOG        |  1 +
 pub/share/wups11a.ps | 31 +++++++++++++++++--------------
 3 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/TODO b/TODO
index 947253b6..3b5c58a7 100644
--- a/TODO
+++ b/TODO
@@ -1,7 +1,7 @@
 == Todo at once ==
 
-cmake: detect yaml-cpp version (0.3, not 0.5)
-cmake: detect gnuplot X11 support
+msa vs mpa sample stdv
+cwc by default when data have no dy
 
 cp: table header placement, correct 1-R^2
 
@@ -9,6 +9,7 @@ store status cg, cx of curve files
 
 rework dy, dp
 
+
 == To investigate ==
 
 cmake:
diff --git a/pub/CHANGELOG b/pub/CHANGELOG
index f59e2124..00a4115f 100644
--- a/pub/CHANGELOG
+++ b/pub/CHANGELOG
@@ -4,6 +4,7 @@ Release 2.3.1c
   - now requires cmake 2.8.12 (older version were untested)
 - Bug fix:
   - "stdv" was variance. Now "var" and "stdv" are available
+  - plot error bars with same line thickness as the symbol
 
 Release 2.3.1b of 22sep15
 
diff --git a/pub/share/wups11a.ps b/pub/share/wups11a.ps
index bd53b4d3..cac412a8 100644
--- a/pub/share/wups11a.ps
+++ b/pub/share/wups11a.ps
@@ -1084,19 +1084,22 @@ WuGdict11a begin
 %%  Plot an asymmetric vertical error bar:
 
 /errorbar { % x y d- d+ | -
-   3 copy pop pop
-   dup 0 gt x 10 lt and {
-      4 copy
-      x pop add 10. 2 copy gt { x } if pop ym x xm x
-      2 copy x .05 sub x np mv .1 0 rl st
-      np mv
-      pop sub 0. 2 copy lt { x } if pop ym x xm x
-      2 copy lineto st
-      x .05 sub x np mv .1 0 rl st
-      } {
-      pop pop pop pop
-      } ifelse
-   } def
+   gsave
+      slin setline
+      3 copy pop pop
+      dup 0 gt x 10 lt and {
+         4 copy
+         x pop add 10. 2 copy gt { x } if pop ym x xm x
+         2 copy x .05 sub x np mv .1 0 rl st
+         np mv
+         pop sub 0. 2 copy lt { x } if pop ym x xm x
+         2 copy lineto st
+         x .05 sub x np mv .1 0 rl st
+         } {
+         pop pop pop pop
+         } ifelse
+      grestore
+} def
 
 
 %%  Plot a data symbol:
@@ -1105,7 +1108,7 @@ WuGdict11a begin
     gsave
        offset
        srad dup scale
-       slin srad div setline % Faktor 1/div unverstanden, aber noetig
+       slin srad div setline % factor 1/srad compensates "scale"
        ps % the actual plot symbol, defined by 'pset'
        grestore
    } def
-- 
GitLab