|
[Rivet-svn] r2714 - trunk/binblackhole at projects.hepforge.org blackhole at projects.hepforge.orgThu Oct 14 13:52:18 BST 2010
Author: hoeth Date: Thu Oct 14 13:52:18 2010 New Revision: 2714 Log: Don't go south if a plot doesn't have labels Modified: trunk/bin/rivet-rmgaps Modified: trunk/bin/rivet-rmgaps ============================================================================== --- trunk/bin/rivet-rmgaps Thu Oct 14 13:34:52 2010 (r2713) +++ trunk/bin/rivet-rmgaps Thu Oct 14 13:52:18 2010 (r2714) @@ -72,9 +72,9 @@ f.write(' </dataPoint>\n') def write_datapointset_header(self, f): - title = self.description.setdefault('Title', None) - xlabel = self.description.setdefault('XLabel', None) - ylabel = self.description.setdefault('YLabel', None) + title = self.description.setdefault('Title', '') + xlabel = self.description.setdefault('XLabel', '') + ylabel = self.description.setdefault('YLabel', '') path = self.description.setdefault('AidaPath', None) if path is not None: path = path.replace('>', '>').replace('<', '<').replace('"', '"') @@ -82,12 +82,9 @@ f.write(' path="%s" title="%s">\n' % (os.path.abspath(path.replace(path.split('/')[-1], '')), title.replace('>', '>').replace('<', '<').replace('"', '"'))) f.write(' <annotation>\n') - if title is not None: - f.write(' <item key="Title" value="%s" sticky="true"/>\n' % title.replace('>', '>').replace('<', '<').replace('"', '"')) - if xlabel is not None: - f.write(' <item key="XLabel" value="%s" sticky="true"/>\n' % xlabel.replace('>', '>').replace('<', '<').replace('"', '"')) - if ylabel is not None: - f.write(' <item key="YLabel" value="%s" sticky="true"/>\n' % ylabel.replace('>', '>').replace('<', '<').replace('"', '"')) + f.write(' <item key="Title" value="%s" sticky="true"/>\n' % title.replace('>', '>').replace('<', '<').replace('"', '"')) + f.write(' <item key="XLabel" value="%s" sticky="true"/>\n' % xlabel.replace('>', '>').replace('<', '<').replace('"', '"')) + f.write(' <item key="YLabel" value="%s" sticky="true"/>\n' % ylabel.replace('>', '>').replace('<', '<').replace('"', '"')) f.write(' <item key="AidaPath" value="%s" sticky="true"/>\n' % path) f.write(' <item key="FullPath" value="/%s.aida%s" sticky="true"/>\n' % (filename.split('/')[-1], path)) f.write(' </annotation>\n')
More information about the Rivet-svn mailing list |