|
[Rivet-svn] r2192 - in trunk: . bin docblackhole at projects.hepforge.org blackhole at projects.hepforge.orgMon Dec 14 23:50:56 GMT 2009
Author: hoeth Date: Mon Dec 14 23:50:56 2009 New Revision: 2192 Log: make-plots: new option "ConnectGaps". Modified: trunk/ChangeLog trunk/bin/make-plots trunk/doc/make-plots.txt Modified: trunk/ChangeLog ============================================================================== --- trunk/ChangeLog Mon Dec 14 22:35:10 2009 (r2191) +++ trunk/ChangeLog Mon Dec 14 23:50:56 2009 (r2192) @@ -3,6 +3,10 @@ * New option "MainPlot" in make-plots. For people who only want the ratio plot and nothing else. + * New option "ConnectGaps" in make-plots. Set to 1 if you + want to connect gaps in histograms with a line when ErrorBars=0. + Works both in PLOT and in HISTOGRAM sections. + * Eliminated global variables for coordinates in make-plots and enabled multithreading. Modified: trunk/bin/make-plots ============================================================================== --- trunk/bin/make-plots Mon Dec 14 22:35:10 2009 (r2191) +++ trunk/bin/make-plots Mon Dec 14 23:50:56 2009 (r2192) @@ -186,6 +186,12 @@ inputdata.histos[i].add(inputdata.histos[previous]) previous=i + def set_histo_options(self,inputdata): + if inputdata.description.has_key('ConnectGaps'): + for i in inputdata.histos.keys(): + if not inputdata.histos[i].description.has_key('ConnectGaps'): + inputdata.histos[i].description['ConnectGaps']=inputdata.description['ConnectGaps'] + def set_borders(self,inputdata): self.set_xmax(inputdata) self.set_xmin(inputdata) @@ -359,6 +365,7 @@ def __init__(self, inputdata): self.set_normalization(inputdata) self.stack_histograms(inputdata) + self.set_histo_options(inputdata) self.set_borders(inputdata) self.yoffset = inputdata.description['PlotSizeY'] self.coors = Coordinates(inputdata) @@ -477,6 +484,7 @@ inputdata.histos[self.refdata].description['LineColor']='black' inputdata.histos[self.refdata].description['LineWidth']='0.3pt' inputdata.histos[self.refdata].description['PolyMarker']='' + inputdata.histos[self.refdata].description['ConnectGaps']='1' self.calculate_ratios(inputdata) self.set_borders(inputdata) self.coors = Coordinates(inputdata) @@ -1039,6 +1047,9 @@ + coors.strphys2frameY(self.data[i]['Content']) + ')(' \ + coors.strphys2frameX(self.data[i]['UpEdge']) + ', ' \ + coors.strphys2frameY(self.data[i]['Content']) + ')\n') + if not (self.description.has_key('ConnectGaps') and self.description['ConnectGaps']=='1'): + if (i+1 < len(self.data)) and (abs(coors.phys2frameX(self.data[i]['UpEdge']) - coors.phys2frameX(self.data[i+1]['LowEdge'])) > 1e-4): + out += ('\\psline') if (self.getFillStyle() != 'none'): # make sure that filled areas go all the way down to the x-axis if (coors.phys2frameX(self.data[-1]['UpEdge']) < 1-1e-4): out += '(' + coors.strphys2frameX(self.data[-1]['UpEdge']) + ', -0.1)\n' Modified: trunk/doc/make-plots.txt ============================================================================== --- trunk/doc/make-plots.txt Mon Dec 14 22:35:10 2009 (r2191) +++ trunk/doc/make-plots.txt Mon Dec 14 23:50:56 2009 (r2192) @@ -218,6 +218,14 @@ By default the `SPECIAL` and `FUNCTION` sections are plotted after the histograms. With these options you can override that behaviour. +-------------------- +ConnectGaps=<0|1> +-------------------- +If error bars are disabled and you want to bridge gaps in a histogram, you +can set this parameter. By default it is off. Setting it in the `PLOT` section +affects all histograms, but you can also set it in the `HISTOGRAM` section for +individual histograms. The local setting overrides the global settig. + Comparison Plots ^^^^^^^^^^^^^^^^ @@ -327,6 +335,14 @@ option. Anything that is understood by pstrick's `dash=...` option is valid. An example for a dash-dotted line is `LineDash=3pt 3pt .8pt 3pt`. +-------------------- +ConnectGaps=<0|1> +-------------------- +If error bars are disabled and you want to bridge gaps in a histogram, you +can set this parameter. By default it is off. Setting it in the `PLOT` section +affects all histograms, but you can also set it in the `HISTOGRAM` section for +individual histograms. The local setting overrides the global settig. + Fillstyles ^^^^^^^^^^
More information about the Rivet-svn mailing list |