|
[Rivet-svn] rivet: enable rotations in make-pgfplotsRivet Mercurial rivet at projects.hepforge.orgFri Jun 15 00:30:01 BST 2018
details: https://rivet.hepforge.org/hg/rivet/rev/ce259bdfe862 branches: release-2-6-x changeset: 6330:ce259bdfe862 user: Christian Gutschow <chris.g at cern.ch> date: Fri Jun 15 00:23:38 2018 +0100 description: enable rotations in make-pgfplots diffs (35 lines): --- a/bin/make-pgfplots Fri Jun 15 00:09:51 2018 +0100 +++ b/bin/make-pgfplots Fri Jun 15 00:23:38 2018 +0100 @@ -560,8 +560,12 @@ #out += ('legend cell align=%s,\n' % kwargs['LegendAlign']) #out += ('legend image post style={sharp plot, -},\n') if kwargs['is2D']: - if kwargs['is3D']: out += ('view={45}{30}, zticklabel pos=right,\n') - else: out += ('view={0}{90}, colorbar,\n') + if kwargs['is3D']: + hrotate = 45 + kwargs['HRotate'] + vrotate = 30 + kwargs['VRotate'] + out += ('view={%i}{%s}, zticklabel pos=right,\n' % (hrotate, vrotate)) + else: + out += ('view={0}{90}, colorbar,\n') out += ('colormap/%s,\n' % kwargs['ColorMap']) if not kwargs['is3D'] and kwargs['Zmode']: out += ('colorbar style={yticklabel=$\\,10^{\\pgfmathprintnumber{\\tick}}$},\n') @@ -948,6 +952,8 @@ #Grid = inputdata.doGrid(), is2D = inputdata.is2dim, is3D = inputdata.attr_bool('Is3D', 0), + HRotate = inputdata.attr_int('HRotate', 0), + VRotate = inputdata.attr_int('VRotate', 0), ColorMap = inputdata.attr('ColorMap', 'jet'), #LegendAlign = inputdata.getLegendAlign(), #LegendPos = inputdata.getLegendPos(), @@ -1162,6 +1168,8 @@ #Grid = inputdata.doGrid(self.name), is2D = inputdata.is2dim, is3D = inputdata.attr_bool('Is3D', 0), + HRotate = inputdata.attr_int('HRotate', 0), + VRotate = inputdata.attr_int('VRotate', 0), ColorMap = inputdata.attr('ColorMap', 'jet'), #LegendAlign = inputdata.getLegendAlign(self.name), #LegendPos = inputdata.getLegendPos(self.name),
More information about the Rivet-svn mailing list |