|
[Rivet-svn] rivet: make-pgfplots: add dummy custom labels to ensure axis ran...Rivet Mercurial rivet at projects.hepforge.orgThu Jun 21 07:30:02 BST 2018
details: https://rivet.hepforge.org/hg/rivet/rev/a124303452a4 branches: release-2-6-x changeset: 6334:a124303452a4 user: Christian Gutschow <chris.g at cern.ch> date: Thu Jun 21 07:18:16 2018 +0100 description: make-pgfplots: add dummy custom labels to ensure axis range exceeds plot range diffs (15 lines): --- a/bin/make-pgfplots Fri Jun 15 12:06:26 2018 +0100 +++ b/bin/make-pgfplots Thu Jun 21 07:18:16 2018 +0100 @@ -598,8 +598,12 @@ if len(majorticks): if float(majorticks[0]) > float(kwargs['%smin' % axis]): majorticks = [ str(2 * float(majorticks[0]) - float(majorticks[1])) ] + majorticks + if len(majorlabels): + majorlabels = [ '.' ] + majorlabels # dummy label if float(majorticks[-1]) < float(kwargs['%smax' % axis]): majorticks.append(str(2 * float(majorticks[-1]) - float(majorticks[-2]))) + if len(majorlabels): + majorlabels.append('.') # dummy label out += ('%stick={%s},\n' % (axis.lower(), ','.join(majorticks))) if kwargs['NeedsXLabels'] and len(majorlabels): out += ('%sticklabels={{%s}},\n' % (axis.lower(), '},{'.join(majorlabels)))
More information about the Rivet-svn mailing list |