|
[Rivet-svn] rivet: 3 new changesetsRivet Mercurial rivet at projects.hepforge.orgFri Jul 22 17:00:02 BST 2016
details: https://rivet.hepforge.org/hg/rivet/rev/25026b524d93 branches: release-2-5-x changeset: 5337:25026b524d93 user: Andy Buckley <andy at insectnation.org> date: Fri Jul 22 16:39:04 2016 +0100 description: Can't support \g regex named groups details: https://rivet.hepforge.org/hg/rivet/rev/00a2c5d52895 branches: release-2-5-x changeset: 5338:00a2c5d52895 user: Andy Buckley <andy at insectnation.org> date: Fri Jul 22 16:51:52 2016 +0100 description: Pythonic clean-up details: https://rivet.hepforge.org/hg/rivet/rev/7e977d2c1ede branches: release-2-5-x changeset: 5339:7e977d2c1ede user: Andy Buckley <andy at insectnation.org> date: Fri Jul 22 16:57:06 2016 +0100 description: Fix newly introduced bug in make-plots which led to data point markers being skipped for all but the last bin. diffs (truncated from 216 to 50 lines): --- a/ChangeLog Thu Jul 21 16:11:44 2016 +0100 +++ b/ChangeLog Fri Jul 22 16:57:06 2016 +0100 @@ -1,3 +1,8 @@ +2016-07-22 Andy Buckley <andy.buckley at cern.ch> + + * Fix newly introduced bug in make-plots which led to data point + markers being skipped for all but the last bin. + 2016-07-21 Andy Buckley <andy.buckley at cern.ch> * Add pid, abspid, charge, abscharge, charge3, and abscharge3 Cut --- a/bin/make-plots Thu Jul 21 16:11:44 2016 +0100 +++ b/bin/make-plots Fri Jul 22 16:57:06 2016 +0100 @@ -1072,7 +1072,7 @@ + ', linewidth=' + drawobject.getLineWidth() \ + ', strokeopacity=' + drawobject.getLineOpacity() \ + ', opacity=' + drawobject.getFillOpacity()) - if drawobject.getLineDash()!='': + if drawobject.getLineDash() != '': out += (', dash=' + drawobject.getLineDash()) if drawobject.getFillStyle()!='none': out += (', fillstyle=' + drawobject.getFillStyle() \ @@ -1225,7 +1225,7 @@ else: self.data.append(line) - def draw(self,coors): + def draw(self, coors): out = "" out += ('\n%\n% Special\n%\n') import re @@ -1233,17 +1233,17 @@ # TODO: More precise number string matching, something like this: # num = r"-?[0-9]*(?:\.[0-9]*)(?:[eE][+-]?\d+]" # regex = re.compile(r'^(.*?)(\\physics[xy]?coor)\(\s?(' + num + ')\s?,\s?(' + num + ')\s?\)(.*)') - for i in xrange(len(self.data)): - while regex.search(self.data[i]): - match = regex.search(self.data[i]) + for l in self.data: + while regex.search(l): + match = regex.search(l) xcoor, ycoor = float(match.group(3)), float(match.group(4)) if match.group(2)[1:] in ["physicscoor", "physicsxcoor"]: xcoor = coors.phys2frameX(xcoor) if match.group(2)[1:] in ["physicscoor", "physicsycoor"]: ycoor = coors.phys2frameY(ycoor) line = "%s(%f, %f)%s" % (match.group(1), xcoor, ycoor, match.group(5)) - self.data[i] = line - out += self.data[i]+'\n' + l = line
More information about the Rivet-svn mailing list |