|
[Rivet-svn] rivet: make-pgfplots: add option to remove x-error barsRivet Mercurial rivet at projects.hepforge.orgThu Jun 21 08:45:01 BST 2018
details: https://rivet.hepforge.org/hg/rivet/rev/81fc8765a2b7 branches: release-2-6-x changeset: 6335:81fc8765a2b7 user: Christian Gutschow <chris.g at cern.ch> date: Thu Jun 21 08:42:34 2018 +0100 description: make-pgfplots: add option to remove x-error bars diffs (24 lines): --- a/bin/make-pgfplots Thu Jun 21 07:18:16 2018 +0100 +++ b/bin/make-pgfplots Thu Jun 21 08:42:34 2018 +0100 @@ -1645,6 +1645,9 @@ def getErrorBandOpacity(self): return self.props.get("ErrorBandOpacity", "1.0") + def removeXerrors(self): + return bool(int(self.props.get("RemoveXerrors", "0"))) + def getSmoothLine(self): return bool(int(self.props.get("SmoothLine", "0"))) @@ -2277,7 +2280,10 @@ if b.val == 0. and b.err == [0.,0.]: continue points += ('%s %s ' % (b.xmid, b.val)) - points += ('%s %s ' % (b.xmid - b.xmin, b.xmax - b.xmid)) + if self.removeXerrors(): + points += ('0 0 ') + else: + points += ('%s %s ' % (b.xmid - b.xmin, b.xmax - b.xmid)) points += ('%s %s' % (b.err[0], b.err[1])) elif self.getSmoothLine(): points += ('(%s,%s)' % (b.xmid, b.val))
More information about the Rivet-svn mailing list |